Clicking bar chart toggles its color

I have a Chart of type "bar". When I click an entry in it, I would like to display its Y value in a separate place (a Label) for one second. That part is working fine.

But it also changes the color of the bar to a darker one, where it remains - until I click it again and it returns to its original color. However, that second click is not registering as a click (the Label does not light up with the percent display the way it does on the first click). So there seems to be some behavior that I'm not understanding (and that doesn't appear to be documented).

You're using the generic version of that event.

What happens if you use the non-generic version?

No difference between using the "any component" version and the specific.

confirmed, the second time click on the dataset will only un-select it, not fire the click event again.

If you indeed want this 'second click' function in your app, maybe you want to try other Chart extensions or make your own one with Canvas, or Labels in Arrangement.

I don't want 2nd-click functonality. I just want the thing to not change color, and then to display the percantage again if I click it again.,

the bar will change to a darker color after selected. I did not notice any where to change this behavor.
You may try other extensions or you make your own chart.

Have you tried forcing a redraw of the chart in the clock Timer?

Flush and fill its data?

Good idea, but it doesn't work. Even if I clear the data, and re-set the colors to their original values - once I draw the chart again, the previously-clicked entry is still extra-dark until I click it again.

That sounds like a bug, unless there's a block to reset the selection.

Have you considered trying other charting methods ?

That's what I was getting at, a bug, or at least some behavior that's not documented at all.

Yep, trying it, using a button for each entry, with varying height. I can use a very skinny chart to get the scale bar along the Y-axis. The button heights don't really seem consistent though: I can scale the button heights so 100% lines up with '100' on the Y-axis, but then if I have a value of 5%, it's noticeably less than quarter-way up to the '20' mark on the Y-axis. No reason to use buttons now, I guess, since I'm printing the actual value above the entry bar; maybe labels would work better.

Nah, drawing the chart myself seems like a fools' errand. I think I can live with the 'Bar' type 'Chart'. I'll get rid of PercentDisplayTimer and just leave PercentDisplay lit up until/if another entry is selected. The darkening of the entry indicates what entry's value is being displayed in PercentDisplay. Only odd thing is if I click the entry again, and the darkening goes away, but there's still a number in PercentDisplay, there's no indication which entry it is. Oh well.

I'd still be nice if this behavior were documented.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.