Commit 3a217e7f authored by Evgeny's avatar Evgeny

Add grid even if not added. Fixes problem with updating them later

parent e7ca0162
......@@ -3701,12 +3701,12 @@
$$.grid = $$.main.append('g')
.attr("clip-path", $$.clipPathForGrid)
.attr('class', CLASS.grid);
if (config.grid_x_show) {
//if (config.grid_x_show) {
$$.grid.append("g").attr("class", CLASS.xgrids);
}
if (config.grid_y_show) {
//}
//if (config.grid_y_show) {
$$.grid.append('g').attr('class', CLASS.ygrids);
}
//}
if (config.grid_focus_show) {
$$.grid.append('g')
.attr("class", CLASS.xgridFocus)
......@@ -7473,7 +7473,7 @@
var gridx = $$.xgrid[0];
for (var id in gridx) {
if(gridx[id]){
gridx[id].style.display = "";
gridx[id].style.display = "block";
}
}
......@@ -7514,7 +7514,7 @@
var gridy = $$.ygrid[0];
for (var id in gridy) {
gridy[id].style.display = "";
gridy[id].style.display = "block";
}
$$.updateAndRedraw({withLegend: true});
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -46,7 +46,7 @@ c3_chart_fn.gridX.show = function() {
var gridx = $$.xgrid[0];
for (var id in gridx) {
if(gridx[id]){
gridx[id].style.display = "";
gridx[id].style.display = "block";
}
}
......@@ -87,7 +87,7 @@ c3_chart_fn.gridY.show = function() {
var gridy = $$.ygrid[0];
for (var id in gridy) {
gridy[id].style.display = "";
gridy[id].style.display = "block";
}
$$.updateAndRedraw({withLegend: true});
......
......@@ -3,12 +3,12 @@ c3_chart_internal_fn.initGrid = function () {
$$.grid = $$.main.append('g')
.attr("clip-path", $$.clipPathForGrid)
.attr('class', CLASS.grid);
if (config.grid_x_show) {
//if (config.grid_x_show) {
$$.grid.append("g").attr("class", CLASS.xgrids);
}
if (config.grid_y_show) {
//}
//if (config.grid_y_show) {
$$.grid.append('g').attr('class', CLASS.ygrids);
}
//}
if (config.grid_focus_show) {
$$.grid.append('g')
.attr("class", CLASS.xgridFocus)
......
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