Hi VizGuy, Thanks for reply, Actually I have JSON data, this JSON data have rows & cols, we knew that how many cols are available in JSON data but rows are not specified these can be 1,2,3,4....n. That's why I an logic which can be handle to rows dynamically.
Thanks - arsh On Feb 18, 4:18 pm, VizGuy <[email protected]> wrote: > Hi! > I will need some more information to answer your question. > What do you mean by dynamic rows? > Do you mean using a Data Source and querying it? > Or just having the server specify different row data on every rendering? > Please clarify.. > > Regards, > VizGuy > > On Wed, Feb 18, 2009 at 10:39 AM, Arshad <[email protected]> wrote: > > > Hi All, > > I have create a TimeLine chart using JSON, I am using 3 cols & 5 rows > > here. This is working fine but my problem is that I have fixed cols in > > JSON but rows are not fix, these are dynamically. So please let me > > know that how can I use dynamic rows in my JSON. > > > / > > > *********************************************************************************/ > > // To Being used to calling data from DataTable's Object for Time Line > > Chart. > > function loadTimeLine() { > > drawChart(); > > } > > > // To Being used to Load API for Time LIne Chart. > > function loadTimeLineAPI() { > > var a = google.load("visualization", "1", {"callback": loadTimeLine, > > packages:["annotatedtimeline"]}); > > } > > > // Creating DataTable's Object for Time Line Chart data. > > 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}); > > } > > > // jQuery function to document ready. > > $(document).ready(function() > > { > > loadTimeLineAPI(); > > }); > > / > > > *********************************************************************************/ > > > Thanks - arsh --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en -~----------~----~----~----~------~----~------~--~---
