There is no number format that would work to do what you want. You can
approach this in two different ways: either use a string axis, and set the
values to the format you want (eg, 1.43273200 would be input as
"1.43273.2.00"), or you can set the hAxis.ticks option. The ticks option
takes an array of numbers or objects that describe where on the axis to
place tick marks. The objects have "v" and "f" properties, where "v" is
the value to place the tick mark at, and "f" is the label to place at that
tick mark. You could set the array like this:
hAxis: {
ticks: [{v: 1.43273200, f: '1.43273.2.00'}, {v: 1.43273201, f:
'1.43273.2.01'}, {v: 1.43273202, f: '1.43273.2.02'}...]
}
for whatever values and labels you want to use.
On Tuesday, April 15, 2014 10:41:36 AM UTC-4, achraf arhihou wrote:
>
> Hi all,
>
> I try to draw a line chart, i would like to change the format of my
> hAxis, I have some data like this
>
> var data = new google.visualization.DataTable();
> data.addColumn('number', 'Rev');
> data.addColumn('number', 'value');
>
> data.addRows([[1.43273200,355],[1.43273201,342],[1.43273202,364],[1.43273203,353]]);
>
>
> which gives me:
>
>
> <https://lh5.googleusercontent.com/-P5oh7L9Fi5Y/U01EL-ic7pI/AAAAAAAABFc/7Adn_eO2zns/s1600/2014-04-15+15_33_24-Chart.png>
>
>
>
>
>
>
> I'm trying to plot the text label of my hAxis like 1.43273.2.00 ,
> 1.43273.2.01 , 1.43273.2.02, 1.43273.2.03
>
> Is that possible with formatting data?
>
>
>
--
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.