Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancing Curved Lines support: differentiating between "real" datapoints and interpolated spline points #122

Open
kenirwin opened this issue Jul 6, 2015 · 1 comment

Comments

@kenirwin
Copy link
Contributor

kenirwin commented Jul 6, 2015

I'd like to a configuration option that would affect the implementation of the curvedLines plugin. Because the CL plugin creates lots of interpolated points in between the real/known points that are actually part of the data series, I'd like to add a tooltip option to explicitly list the data type in the tooltip as "Real Data Point" or "Interpolated Point".

I've got the gut of the operation worked out; I'm opening the issue here to get feedback on it before I commit too much to one approach.

I'm imagining:

  • a tooltipOpt currently named and valued "showRealVsInterpolatedData: true"
    • it's a long name, but intelligible
    • defaults to true so the extra info shows
    • my test has this opt affect a whole chart rather than an individual series -- do you think it should be on a series-by-series basis instead?
    • right now the extra tooltip info shows on all series, whether or not the CL plugin is turned on for that line. that way, the user won't be confused as to why some points have real-v-interp data and some don't

If one of the maintainers of the plugin could chime in, I'd be glad to count your opinion in as I work out the implementation. (I've got a working version, and it's currently at a stage where some fine tuning would be easy to do.)

Thanks

@Roundaround
Copy link
Collaborator

My first issue with this implementation is simply that the extra data definitely should not be displayed/tracked by default. The general guidelines (that we follow internally in the tooltip plugin and that flot itself defined in its plugin development guidelines) is that anything that adds to the base chart should be off by default. For instance, take a look at the lines option - it sets the chart to show the tooltip on the lines between points. Seems like a trivial thing that everyone would want, but it's still off by default because of potential cluttering or performance issues. I'd recommend taking the same approach to this.

Beyond that, I don't really see any practical use to knowing if a point is interpolated or real other than to perhaps style the tooltip or the data point itself a little differently. I don't think we should support any native display of the interpolated vs. real data within the tooltip. The best option would be to supply the information on a point-by-point basis (that users of the tooltip plugin could utilize), but this would be a feature change for the curved lines plugin - not here.

However, your idea that it should be chart-wide is fine. Because of what I said above, there would be no 'real' downfall to setting it to on for the whole chart, as long as the users know that it does so. We can then leave it up to them to selectively use that information as they please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants