Hi,
My question is that I dont know that how many rows in JSON.. And this
JSON have huge data of JSON(alot or rows). Now my question is that how
can I use to this huge JSON's rows data using a
variable, please let me know that how can I use it.
And I am using to this js function, In this example I am using only 5
row but I dont know that how many rows are available in JSON data. So
I want to know that how can I use to dynamic rows of JSON data.
Javascript function for JSON:
-------------------------------------
/
*******************************************************************************************************************/
function drawChart() {
var data = new google.visualization.DataTable({
cols: [
{label: 'Date', type: 'date'},
{label: 'Volume', type: 'number'},
{label: 'Price', type: 'number'}],
rows: [
{c:[{v: new Date(2008, 3 ,26)}, {v:
4.482362E7}, {v:28.56}]},
{c:[{v: new Date(2008, 8, 26)}, {v:
4.477303E7}, {v:27.27}]},
{c:[{v: new Date(2008, 9, 16)}, {v:
1.116584E8}, {v:25.99}]},
{c:[{v: new Date(2008, 8, 4)}, {v:
6.040522E7}, {v:25.28}]},
{c:[{v: new Date(2008, 7, 11)}, {v:
6.810552E7}, {v:25.25}]}
]
});
var chart = new google.visualization.AnnotatedTimeLine
(document.getElementById('div1'));
chart.draw(data, {displayAnnotations: true});
}
/
*******************************************************************************************************************/
Thanks
- arsh
On Feb 18,
On Feb 19, 2:25 pm, VizGuy <
viz...@google.com> wrote:
> Your mistake is setting the first column to be of type 'date' and not
> 'datetime'.
> This is described athttp://
code.google.com/apis/visualization/documentation/gallery/annot...
> ("If the first column is of type date (and not datetime) then the time
> resolution on the X axis will not get below days.")
>
> Regards,
> VizGuy
>
> > > > ...- Hide quoted text -
>
> - Show quoted text -