Commit 159fdb24 authored by Evgeny's avatar Evgeny

Show title :P

parent f596af49
......@@ -14,3 +14,7 @@ install: clean
clean:
rm -rf node_modules
rm -rf bower_components
publish:
git push origin 0.4.9d
git push github 0.4.9d
......@@ -4128,6 +4128,7 @@
if (!config.legend_show) {
config.legend_show = true;
$$.legend.style('visibility', 'visible');
$$.legend.style('display', 'block');
if (!$$.legendHasRendered) {
$$.updateLegendWithDefaults();
}
......@@ -4135,6 +4136,7 @@
$$.removeHiddenLegendIds(targetIds);
$$.legend.selectAll($$.selectorLegends(targetIds))
.style('visibility', 'visible')
.style('display', 'block')
.transition()
.style('opacity', function () { return $$.opacityForLegend($$.d3.select(this)); });
};
......@@ -4277,6 +4279,7 @@
.enter().append('g')
.attr('class', function (id) { return $$.generateClass(CLASS.legendItem, id); })
.style('visibility', function (id) { return $$.isLegendToShow(id) ? 'visible' : 'hidden'; })
.style('display', function(id) { return $$.isLegendToShow(id) ? 'block': 'none' })
.style('cursor', 'pointer')
.on('click', function (id) {
if (config.legend_item_onclick) {
......@@ -6834,7 +6837,6 @@
.attr('y', y);
}
};
......
......@@ -69,6 +69,5 @@ c3.chart.fn.redrawTitle = function(hasSubs, isSub){
.attr('y', y);
}
};
......@@ -87,6 +87,7 @@ c3_chart_internal_fn.showLegend = function (targetIds) {
if (!config.legend_show) {
config.legend_show = true;
$$.legend.style('visibility', 'visible');
$$.legend.style('display', 'block');
if (!$$.legendHasRendered) {
$$.updateLegendWithDefaults();
}
......@@ -94,6 +95,7 @@ c3_chart_internal_fn.showLegend = function (targetIds) {
$$.removeHiddenLegendIds(targetIds);
$$.legend.selectAll($$.selectorLegends(targetIds))
.style('visibility', 'visible')
.style('display', 'block')
.transition()
.style('opacity', function () { return $$.opacityForLegend($$.d3.select(this)); });
};
......@@ -236,6 +238,7 @@ c3_chart_internal_fn.updateLegend = function (targetIds, options, transitions) {
.enter().append('g')
.attr('class', function (id) { return $$.generateClass(CLASS.legendItem, id); })
.style('visibility', function (id) { return $$.isLegendToShow(id) ? 'visible' : 'hidden'; })
.style('display', function(id) { return $$.isLegendToShow(id) ? 'block': 'none' })
.style('cursor', 'pointer')
.on('click', function (id) {
if (config.legend_item_onclick) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment