Re: [visualization-api] Creating a chart after creating data in the body of a web page.

19 views
Skip to first unread message

Daniel LaLiberte

unread,
Jan 18, 2016, 5:15:49 PM1/18/16
to Google Visualization API
It is certainly possible to draw a chart with data that is determined after user interaction.  Just create another DataTable, or modify an existing one, and call draw() on your chart again with the new data.  Here is an example that shows how you could do it:  https://jsfiddle.net/dlaliberte/qsxyk1fg/

On Sun, Jan 17, 2016 at 3:49 PM, <debe...@indiana.edu> wrote:
Writing html is new to me and I am finding it quite a challenge, especially when it comes to using java script and google charts.
I'm working on something very similar to David Wilkinson's post on "Creating bell curves/normal distributions?". I have text boxes with which I input the number of data points to be generated as well as the mean and size of one standard distribution. I want to be able to plot a histogram of the data points generated in order to show the variation in the location of the points wrt the mean value. The idea being that after calculating say a set of 3, 4l 5 data points multiple times, a person gets a feeling for how many points you need before you get a somewhat reliable value for the mean of a data set.

I see that in every example shown the scripts that generate the graph and the graphs data points are generated in the header. But in my case, I don't have data until the number of data points, etc. is entered using text boxes in the body. I haven't been able to figure out how to generate the graph after I have generated the data. Does someone perhaps have an example of how to do this? I know this is a rather open ended question and suspect the answer is likely trivial. But any assistance will be gratefully appreciated.

--
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 google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/46bd5896-13c8-4680-baa2-b9697eaf8f14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages