Microsoft
Software
Hardware
Network
Question : Google Chart corechart help
Dear Experts,
I have the following json structure, which can be formatted to a named style json structure if need be:
[
{"User1":{"v":10,"f":"£20"
}},
{"User2":{"v":20,"f":"£40"
}},
{"User3":{"v":20,"f":"£40"
}},
{"User4":{"v":30,"f":"£60"
}},
{"User5":{"v":20,"f":"£40"
}}
]
I am trying to get this into the following javascript google chart
data.addRows(5);
data.setValue(0, 0, 'User1');
data.setValue(0, 1, 20);
data.setValue(1, 0, 'User2');
data.setValue(1, 1, 40);
data.setValue(2, 0, 'User3');
data.setValue(2, 1, 40);
data.setValue(3, 0, 'User4');
data.setValue(3, 1, 60);
data.setValue(4, 0, 'User5');
data.setValue(4, 1, 40);
Which works if I do this:
data.addRows(json.length);
for(var j in json) {
for(var k in json[j]) {
data.setValue(parseInt(j),
0, k);
data.setValue(parseInt(j),
1, parseInt(json[j][k].f.subs
tring(1)))
;
}
}
How do I get it to display the "£" sign too, next to the "f" value, for display purposes only?
Please help
Thanks
Answer : Google Chart corechart help
I had a look.
I cannot see where you would replace the % with a £ if that is what you are trying to do...
Perhaps another chart type?
Random Solutions
SBS 2008 shared folder permissions problem - read only - need full control
What causes error "0x80070015" when connecting to bluetooth device in window 7?
not getting the modelviewprojectionmatrix in glsl vertex shader right
Unix filler
Logical Drive Corrupted. Server repair says its not formatted
How to remove new line from a string
Computer in VMWare has black screen with _ symbol
ESX 4.0 Does not detect onboard NIC
Outlook 2007 - Connection to Microsoft Exchange is unavailable, when creating calendar items?
Shopping for Quad-Core desktop for around $500...opinions?