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

New functions for series in dataset in charts #286

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

malloc82
Copy link
Contributor

New series function:

  • update-series: update a series' data points with either append or overwrite. This should work on both scatter plots and line plots. Also since time series is a line plot (xy-plot), it should work for that too. I only tests for the scatter plot and line plot
  • remove-series: remove a series with a given label name in all datasets
  • get-series-by-label: search through all datasets in order, return the series that has given label. If not found, return nil. Note that, there is a get-series function already, so I named this as get-series-by-label. But I do feel the existing get-series behavior is not correct, since it returns all series of given datasets. I suggest that one should be renamed as get-all-series, and this get-series-by-label should be named as get-series. Of course, there is backward compatibility issue to consider, so maybe it's good to rename them for 2.0 release?
  • list-series: list all the series in a has-map format with keys are dataset IDs.
  • clear-chart: remove all the series from all the dataset. The chart will be empty after this.

Corrected function behaviors:

  • has-series?: previously can only tell if the primary dataset has given label. But since in one chart, there could be more than one datasets, this function should search through all datasets, and return true or false based on result.

Also added some tests for this these functions as well.

  - update-series: update a series' data points with either append or overwrite
  - remove-series: remove a series with a given label name in all datasets
  - get-series-by-label: search through all datasets in order, return
    the series that has given label. If not found, return nil
Corrected function behaviors:
  - has-series?: previously can only tell if the primary dataset has
    given label. But since in one chart, there could be more than one
    datasets, this function should search through all datasets, and
    return true or false based on result.
@malloc82 malloc82 changed the title New functions for series in dataset New functions for series in dataset in charts Feb 4, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants