Setting the "pattern" property of the column does not do anything. Also,
this will throw a syntax error:
['Alfred Hitchcock (1935)', 8.4 $, 7.9]
You need to remove the $.
To format the data, use a NumberFormatter:
var formatter = new google.visualization.NumberFormat({pattern: '#.## $'});
formatter.format(data, 1);
On Friday, April 11, 2014 2:01:57 PM UTC-4, cyb wrote:
>
> Hi,
>
> i have tried this in googlee playground with a "Stepped Area Chart" but
> this will not work:
>
> function drawVisualization() {
>> var data = google.visualization.arrayToDataTable([
>> ['Director (Year)', {label: "Rotten", type: "number", pattern: "#.##
>> $"}, 'IMDB'],
>> ['Alfred Hitchcock (1935)', 8.4 $, 7.9],
>> ['Ralph Thomas (1959)', 6.9 $, 6.5],
>> ['Don Sharp (1978)', 6.5 $, 6.4],
>> ['James Hawes (2008)', 4.4 $, 6.2]
>> ]);
>>
>> var options = {
>> width: 600, height: 400,
>> title: 'The decline of \'The 39 Steps\'',
>> vAxis: {title: 'Accumulated Rating'},
>> isStacked: true
>> };
>>
>> var chart = new google.visualization.SteppedAreaChart(document.
>> getElementById('visualization'));
>> chart.draw(data, options);
>> }
>>
>
> http://code.google.com/apis/ajax/playground/#stepped_area_chart
>
> Am Montag, 24. März 2014 17:39:44 UTC+1 schrieb cyb:
>>
>> Hi,
>>
>> i get different data from a csv or json file. and this files must pe
>> parsed that i can use it with google charts..
>>
>> so what is the best way to do this ?
>>
>> First the CSV:
>>
>> i get different CSV files they look like this:
>>
>> date,New York,San Francisco,Austin
>> 20111001,63.4,62.7,72.2
>> 20111002,58.0,59.9,67.7
>> 20111003,53.3,59.1,69.4
>> 20111004,70.0,80.0,90.0
>>
>>
>>
>> i have used the following javascript library to convert my csv to an
>> Array that can google charts understand:
>> https://code.google.com/p/jquery-csv/
>>
>> but the problem is, this library did not work on mobile devices, i have
>> tested it on an ipad.
>> So what is the easiest an best solution for parsing a csv to the google
>> format ? the solution must run on mobile devices.
>>
>> Or are there any Frameworks that i can use on server side (java) to
>> convert a csv to a json object that google understands !? Then i can send
>> the json file to my website that google charts can read it !
>>
>> Best regards cyb
>>
>>
--
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.