d3pie icon indicating copy to clipboard operation
d3pie copied to clipboard

Inverse value of expanded property for expanded segment

Open mnezerka opened this issue 9 years ago • 2 comments

Click on segment generates event with several parameters. Parameter "expanded" is:

  • false - when segment is expanded (after clicking on segment)
  • true - when segment is not expanded (after clicking on previously selected segment )

Those values should be inverted: have expanded === true only in case when segment is really expanded

mnezerka avatar Apr 21 '16 12:04 mnezerka

Ah, interesting! Actually that was how I intended it, but I can see the confusion. When you first click on a segment it's not expanded, so expanded === false. So even though it immediately expands, at the time of clicking, it was not expanded.

In retrospect, renaming the property may have been a good idea.

benkeen avatar May 26 '16 03:05 benkeen

And one more related fact - it is not possible to pre-select some segment. I'm talking about case when you need to render chart for the first time and want to expand specific segment without need to click on it.

mnezerka avatar May 30 '16 12:05 mnezerka