Hi,

in our graphs the gridelines are not showing...

Here are our settings:

// Set chart default options
var options = {
width: '100%',
height: 260,
legend: 'none',
backgroundColor: '#fff',
chartArea: {
backgroundColor: '#fff',
width: '100%', 
height: '100%', 
left: 10, 
right: 20,
top: 20
},
hAxis: {
// baseline: 0,
// viewWindowMode: 'pretty',
gridlines: {count: 5},
textPosition: 'none'
},
vAxis: {
baseline: 0.0,
baselineColor: 'red',
gridlines: {count: 5},
textPosition: 'none'
},
series: {0: {color: '#7bd7f0'}},
gridlines: {color: "#cacfd8"},
baselineColor: '#cacfd8',
};

// Load the Visualization API and the linechart package.
google.charts.load('current', {'packages':['corechart'], 'language': 'sk'});


var from = "{arguments.from}";
var to = "{arguments.to}";

google.charts.setOnLoadCallback(drawChart{fund.uid});

function drawChart{fund.uid}() {
var fund = {fund.uid};
var jsonData{fund.uid} = $.ajax({
method: 'POST',
url: 'service/',
data: {
tx_rtgfunds_fund: {
action: 'performance',
id: fund,
from: from,
to: to
}
},
dataType: 'json',
async: false
}).responseText;
var data = new google.visualization.DataTable(jsonData{fund.uid});
var chart{fund.uid} = new 
google.visualization.LineChart(document.getElementById('chart_div{fund.uid}'));
// Get chart range
var axisRange = data.getColumnRange(1);
var min = Math.abs(axisRange.min);
var max = Math.abs(axisRange.max);
var optionsLocal = options;
//console.log('min/max: ' + Math.ceil(min) + ' - ' + Math.ceil(max));
if (max >= min) {
// optionsLocal.hAxis.viewWindowMode = 'pretty';
optionsLocal.vAxis.minValue = Math.ceil(max) * -1;
optionsLocal.vAxis.maxValue = Math.ceil(max);
} else {
optionsLocal.vAxis.minValue = Math.ceil(min) * -1;
optionsLocal.vAxis.maxValue = Math.ceil(min);
}
chart{fund.uid}.draw(data, optionsLocal);
}

Here is the website with the 
graphs: http://dev.iad.sk/en/mutual-funds/conservative-investment/

Thank you very much for your help.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/eb5ce779-d6da-45b9-80ca-8d2af6eab457%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to