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

Responsiveness rules must contain the exact number of series of a chart #6347

Closed
AtishaGarinMchd opened this Issue Feb 7, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@AtishaGarinMchd

AtishaGarinMchd commented Feb 7, 2017

Expected behaviour

Responsive chart options related to an unexisting series or axis should be ignored and should not make the chart crash.
It would be useful to be able to share the same responsive rules with multiple dials.
Ideally, it would be great to have the option to define a series configuration once, applicable for all series of the chart.

Actual behaviour

A chart having less series than responsive.rules.chartOptions.series will crash when responsiveness conditions are met

Live demo with steps to reproduce

  1. Open https://jsfiddle.net/wuang1so/1/
  2. Click on Chart1 button.
    => Top chart series changes to color chartreuse ('#7fff00')
  3. Click on Chart2 button
    => Bottom chart crashes.

Affected browser(s)

Verified on Chrome, probably all.

Associated commit

ff5f92c

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Feb 7, 2017

Collaborator

Ideally, it would be great to have the option to define a series configuration once, applicable for all series of the chart.

Yes, that's what the plotOptions structure does. It works well with your case: https://jsfiddle.net/highcharts/wuang1so/2/

Collaborator

TorsteinHonsi commented Feb 7, 2017

Ideally, it would be great to have the option to define a series configuration once, applicable for all series of the chart.

Yes, that's what the plotOptions structure does. It works well with your case: https://jsfiddle.net/highcharts/wuang1so/2/

@AtishaGarinMchd

This comment has been minimized.

Show comment
Hide comment
@AtishaGarinMchd

AtishaGarinMchd Feb 8, 2017

Thanks, that really helps and let us cut down some lines of code.
Nevertheless xAxis and yAxis are not driven by plotOptions, causing the same need of conditionally adding responsiveness rules.

Example for yAxis below:
https://jsfiddle.net/highcharts/rdmj2q20/3/

AtishaGarinMchd commented Feb 8, 2017

Thanks, that really helps and let us cut down some lines of code.
Nevertheless xAxis and yAxis are not driven by plotOptions, causing the same need of conditionally adding responsiveness rules.

Example for yAxis below:
https://jsfiddle.net/highcharts/rdmj2q20/3/

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
Collaborator

TorsteinHonsi commented Feb 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment