__Hello, guys. I'm practicing in google charts. And I met a problem, which I can't to solve. google chart
I'm using ticks labels:
'vAxis': { ticks: [{ v: 720, f: '12:00' }
And want to customize colors for two values in tick label:
data.addRow(
['{{list[i][0]}}',
{ v: {{list[i][1][0]}}, f: '{{list[i][1][1]}} {**color: #335408**}Yest: + {{list[i][2]}}' }]
How can I do this?
Upd1:
<link rel="stylesheet" href="/static/main.css">
<script src="https://www.google.com/jsapi"></script>
<script>
// var list = {{ list|safe }}
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['', 'May'],
['', 0]
]);
{% for i in range(list|length) %}
data.addRow(
['{{list[i][0]}}',
{ v: {{list[i][1][0]}}, f: '{{list[i][1][1]}}' + '\n' + 'Yest: +{{list[i][2]}}' }]
);
{% endfor %}
var options = {
title: 'Current month',
hAxis: {title: ''},
vAxis: {title: 'H:Min'},
width: 1080,
'vAxis': {
ticks: [{ v: 720, f: '12:00' }, { v: 1440, f: '24:00' }, { v: 2160, f: '36:00' }, { v: 2880, f: '48:00' }, { v: 3600, f: '60:00'}, { v: 4320, f: '72:00'}, { v: 5040, f: '84:00'}, { v: 5760, f: '96:00'}, { v: 6480, f: '108:00'}, { v: 7200, f: '120:00'}, { v: 7920, f: '132:00'}]
}
};
var chart = new google.visualization.ColumnChart(document.getElementById('oil'));
chart.draw(data, options);
}