-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update: support for multiple datasets with AddDataset and strip '//' …
…comments from function options (#285) * Add support for multiple datasets with AddDataset eCharts supports Chart's `dataset` as an array and indexing it in a Series with `datasetIndex`. This replaces the `Dataset` Chart config field with the function `AddDataset`. It also adds `WithDatasetIndex` as an option for `SeriesOpts` The `DatasetList` is JSON rendered as a single object, as before. But multiple Datasets are rendered as Array. This is a breaking change: ``` // old chart.Dataset = opts.Dataset{Source: test} // new chart.AddDataset(opts.Dataset{Source: test}) ``` * Strip '//' comments from function options, add FuncNoStripOpts to skip this * Add lots of missing fields Also some whitespace changes per go fmt for doc comments * Tooltip.ValueFormatter * AxisPointer.Show * AxisPointer.Label * AxisLabel.BackgroundColor * XAxis.AxisPointer * YAxis.AxisPointer * DataZoom.LabelFormatter * Restored `FuncOpts` as default and now have `FuncStripCommentOpts` renamed `funcPat` to `newlineTabPat` for clarity * AxisPointer::Show is not `omitempty` due to default conflicts
- Loading branch information
Showing
4 changed files
with
65 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters