Dearest Google Charts users,
We have been working hard on improving charts, and now need your input. We are considering adding a few methods to our corecharts to help you get data about your trendlines, such as the r^2 value. However, we're not quite sure how you’ll want to use them. We know that we want a method to get the trendline r^2 value, and we think that getting an evaluator function for a trendline would be useful as well; but we also want to give you the ability to pull out the trendline expression. Here's where things get a bit blurry.
We could do the simple thing, and simply create a method that returns the plaintext equation. This would allow you to show the equation elsewhere on the page. You might also parse it, but parsing can be hard, so we’ll provide some utilities to help with that. Some alternatives to mitigate this issue would be:
to return a JSON form an abstract syntax tree of the equation, an example might be:
y = 2x + 1: {operation: '=', operands: ['y', {operation: '+', operands: [{operation: '*', operands: [2, 'x']}, 1]}]}
to return a Lisp/Scheme-like abstract syntax tree, using arrays and prefix notation. An example of that might be:
y = 2x + 1: ['=', 'y', ['+', [2, 'x'], 1]]
to return an array of coefficients, possibly with the type of the trendline:
2x + 1: {type: 'linear', coefficients: [2, 1]}
exp(5x + 3): {type: 'exponential', coefficients: [5, 3]}
We can also return an abstract syntax tree as well as a plaintext form, though that is getting a bit redundant. So, what are your thoughts here? Your opinions are most welcome.
Happy Coding,
Sergey and the rest of the Google Charts Team
--
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/3d24532b-df2b-4894-a0dc-c6bf6e4db97e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
• | Sergey Grabkovsky | |
• | Software Engineer | |
• | Google, Inc | |
• |
--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/vHSBJPvIANo/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAEwwup7OG0Posdw15p5HEs58Ri5o7acFu8SiLz3VWNbtU%2BHytQ%40mail.gmail.com.
Sergey,
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@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/3d24532b-df2b-4894-a0dc-c6bf6e4db97e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.