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

Range support for SeriesDescriptor.CollectionIndex #498

Open
zateutsch opened this issue Oct 7, 2021 · 0 comments
Open

Range support for SeriesDescriptor.CollectionIndex #498

zateutsch opened this issue Oct 7, 2021 · 0 comments

Comments

@zateutsch
Copy link

zateutsch commented Oct 7, 2021

Summary

More dynamic usage of CollectionIndexes for SeriesDescriptors could add some flexibility to dynamic Chart creation. In my current fork of the repo, I have the CollectionIndex property functioning as a range start point:

A SeriesDescriptor with a CollectionIndex of 2 will effect every Series style from index 2 on, up until the next CollectionIndex on a new SeriesDescriptor.

API Changes

Potential API Changes:

  • Functionality change to ChartSeriesProvider.GetDescriptor to switch to ranges
  • Addition of SeriesDescriptor.RangeIndex property to describe range behavior separate from existing CollectionIndex behavior

My current hacky implementation of ChartSeriesProvider.GetDescriptor for ranges:
Getting a max descriptor index implementation

Intended Use Case

Intended use case would be for adding a dynamic number of series to a chart that could all have different styles. Range support would allow you to "section off" portions of your ObservableCollection and DataBind to indexes to keep the chart dynamically updating.

Another potential change would be to change the SeriesProvider to allow multiple ObservableCollections, where each Collection represents a unique styling,but this change looks considerably less practical given current architecture.

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

1 participant