Inverse value of expanded property for expanded segment
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
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.
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.