I am currently working on implementing the Google Chart API alongside AngularJS.
I attempted to adjust the min
property of the vertical axis for my column chart to 0
using the following code:
var dataMois = CaDuMois.query(function(){
$scope.comparatifVentes.data = {
"cols": [
{id: "t", label: "Month", type: "string"},
{id: "s", label: "Sales", type: "number"}
],
"rows": [
{c: [
{v: d.getFullYear()-4},
{v: dataMois[4].value},
]},
{c: [
{v: d.getFullYear()-3},
{v: dataMois[3].value}
]},
{c: [
{v: d.getFullYear()-2},
{v: dataMois[2].value},
]},
{c: [
{v: d.getFullYear()-1},
{v: dataMois[1].value},
]},
{c: [
{v: "Current "+d.getFullYear()},
{v: dataMois[0].value},
]}
],
"vAxis.viewWindow": [{min:"0"}]
};
$scope.comparatifVentes.type = "ColumnChart";
$scope.comparatifVentes.options = {
'backgroundColor': '#f5f5f5',
'title': "Total Sales Amount (€) for the Last 5 Months of "+monthNames[n],'height':"250"
}
});
<div class="row">
<div class="col-md-12">
<div google-chart chart="comparatifVentes" style="{{chart.cssStyle}}"/>
</div>
</div>
However, despite setting the min
to 0
, the value displayed on my chart remains at 250000
.
Could I possibly be making an error somewhere in my implementation?