Skip to content

Avoid random sort of legend - #1741

Open
EijiSugiura wants to merge 1 commit into
c3js:mainfrom
EijiSugiura:master
Open

Avoid random sort of legend#1741
EijiSugiura wants to merge 1 commit into
c3js:mainfrom
EijiSugiura:master

Conversation

@EijiSugiura

Copy link
Copy Markdown

Accidentally the order of legend are changed, when we create a graph which both of tooltip and legend are enabled.
To avoid this behavior, we pass deep copy of "$$.data.targets" to orderTargets().

Though it is dirty fix, but works for us.

Accidentally order of legend are changed, when we create a graph which both of tooltip and legend are enabled.
To avoid this behavior, we pass deep copy of "$$.data.targets" to orderTargets().
@codecov-io

Copy link
Copy Markdown

Current coverage is 64.04%

Merging #1741 into master will not change coverage

@@             master      #1741   diff @@
==========================================
  Files             1          1          
  Lines          4400       4400          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           2818       2818          
  Misses         1582       1582          
  Partials          0          0          

Powered by Codecov. Last updated by 223404a...575c84b

@craigdrayton

Copy link
Copy Markdown

I'm experiencing this problem too: I can load data and then order it using an order function, but as soon as I resize the chart, the legend order changes.

@dborstelmann

Copy link
Copy Markdown

I am also experiencing this problem. Tested out this fix and it works for me. Would love to see this get merged soon so I don't have to use my own copy of c3

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.

4 participants