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

reset the default color to series #6138

Closed
crh225 opened this Issue Dec 13, 2016 · 14 comments

Comments

Projects
None yet
3 participants
@crh225

crh225 commented Dec 13, 2016

Expected behaviour

when I clear all series, then add a new series, it should start over on the colors.
It says I can do chart.counters.color = 0; but counters in not in the latest typings for highcharts.

Actual behaviour

similar issue to #203

Affected browser(s)

all

@oysteinmoseng

This comment has been minimized.

Show comment
Hide comment
@oysteinmoseng

oysteinmoseng Dec 14, 2016

Collaborator

There is a chart.colorCounter, see http://jsfiddle.net/1ok4oege/.

Not sure how we should handle this automatically, as we can't just decrement this every time we remove a series, in case the series is not the last one, or there are custom colors on the series.

Collaborator

oysteinmoseng commented Dec 14, 2016

There is a chart.colorCounter, see http://jsfiddle.net/1ok4oege/.

Not sure how we should handle this automatically, as we can't just decrement this every time we remove a series, in case the series is not the last one, or there are custom colors on the series.

@crh225

This comment has been minimized.

Show comment
Hide comment
@crh225

crh225 Dec 14, 2016

That link does not use rulings from the definabtly types project for highcharts.

crh225 commented Dec 14, 2016

That link does not use rulings from the definabtly types project for highcharts.

@crh225

This comment has been minimized.

Show comment
Hide comment
@crh225

crh225 Dec 14, 2016

That link does not use typings*

crh225 commented Dec 14, 2016

That link does not use typings*

@havgry

This comment has been minimized.

Show comment
Hide comment
@havgry

havgry Dec 14, 2016

As far as I can see counters is no longer part of the chart object and probably hasn't been for a while.

Regarding typings you're welcome to create a pull request with the addition of colorCounter but that's a different repository: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/highcharts

havgry commented Dec 14, 2016

As far as I can see counters is no longer part of the chart object and probably hasn't been for a while.

Regarding typings you're welcome to create a pull request with the addition of colorCounter but that's a different repository: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/highcharts

@crh225

This comment has been minimized.

Show comment
Hide comment
@crh225

crh225 Dec 14, 2016

I realize it's a different repository but isn't highcharts responsible for their own typings?

crh225 commented Dec 14, 2016

I realize it's a different repository but isn't highcharts responsible for their own typings?

@crh225

This comment has been minimized.

Show comment
Hide comment
@crh225

crh225 Dec 14, 2016

Couldn't when it goes and gets the next chart series color, it does a check that says: if (series.length === 0) { chart.counter = 0;}

crh225 commented Dec 14, 2016

Couldn't when it goes and gets the next chart series color, it does a check that says: if (series.length === 0) { chart.counter = 0;}

@oysteinmoseng

This comment has been minimized.

Show comment
Hide comment
@oysteinmoseng

oysteinmoseng Dec 14, 2016

Collaborator

We are not behind the DefinitelyTyped project for Highcharts, this is a 3rd party project.

Regarding chart.colorCounter = 0, this is something we could perhaps consider? @TorsteinHonsi comments?

Collaborator

oysteinmoseng commented Dec 14, 2016

We are not behind the DefinitelyTyped project for Highcharts, this is a 3rd party project.

Regarding chart.colorCounter = 0, this is something we could perhaps consider? @TorsteinHonsi comments?

@crh225

This comment has been minimized.

Show comment
Hide comment
@crh225

crh225 Jan 4, 2017

@oysteinmoseng, @TorsteinHonsi, have you guys any update on this?

crh225 commented Jan 4, 2017

@oysteinmoseng, @TorsteinHonsi, have you guys any update on this?

@oysteinmoseng

This comment has been minimized.

Show comment
Hide comment
@oysteinmoseng

oysteinmoseng Jan 5, 2017

Collaborator

We now reset the counter for the color and marker symbols whenever all series are removed. Hopefully this solves your problem.

Collaborator

oysteinmoseng commented Jan 5, 2017

We now reset the counter for the color and marker symbols whenever all series are removed. Hopefully this solves your problem.

@crh225

This comment has been minimized.

Show comment
Hide comment
@crh225

crh225 Jan 5, 2017

@oysteinmoseng it solves it! what version of highcharts will this be released in?

crh225 commented Jan 5, 2017

@oysteinmoseng it solves it! what version of highcharts will this be released in?

@oysteinmoseng

This comment has been minimized.

Show comment
Hide comment
@oysteinmoseng

oysteinmoseng Jan 6, 2017

Collaborator

@crh225 This will be part of the next maintenance release, v5.0.7

Collaborator

oysteinmoseng commented Jan 6, 2017

@crh225 This will be part of the next maintenance release, v5.0.7

@oysteinmoseng oysteinmoseng added this to the 5.0.7 milestone Jan 6, 2017

@crh225

This comment has been minimized.

Show comment
Hide comment
@crh225

crh225 commented Jan 9, 2017

Thanks!

@crh225

This comment has been minimized.

Show comment
Hide comment
@crh225

crh225 Jan 9, 2017

@oysteinmoseng , I tried to update to 5.0.7, but it cannot find it (yet?) on npm
image

crh225 commented Jan 9, 2017

@oysteinmoseng , I tried to update to 5.0.7, but it cannot find it (yet?) on npm
image

@oysteinmoseng

This comment has been minimized.

Show comment
Hide comment
@oysteinmoseng

oysteinmoseng Jan 10, 2017

Collaborator

@crh225 5.0.7 is not released yet, however you can find the latest code here on github. Example: http://github.highcharts.com/highcharts.js

Collaborator

oysteinmoseng commented Jan 10, 2017

@crh225 5.0.7 is not released yet, however you can find the latest code here on github. Example: http://github.highcharts.com/highcharts.js

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