Hi...
Sorry for all these questions on the legend box lately... we successfully moved from our own WPF 'legend' back to the Arction legend (mainly to get it stored into the image file when using SaveToFile()). One difference I noticed between the two mainly is the WPF control's checkbox could be selected/unselected by also clicking the string Content associated with the checkbox... is there a way to extend that into the Arction legend as well? It's ok if the answer is no, just thought I would ask..
[img]
[/img]
Thanks
--Chris
Chart legend, extending checkbox hitbox to include string
Moderator: Queue Moderators
-
- Posts: 43
- Joined: Mon Oct 19, 2015 2:50 am
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: Chart legend, extending checkbox hitbox to include strin
Hi Chris,
You can do that by setting SeriesTitleMouseClick event handler, and changing the visibility of the series there. Check box status is changed bases on series visibility.
You can do that by setting SeriesTitleMouseClick event handler, and changing the visibility of the series there. Check box status is changed bases on series visibility.
Code: Select all
m_chart.ViewXY.LegendBox.MoveFromSeriesTitle = false;
m_chart.ViewXY.LegendBox.SeriesTitleMouseClick += LegendBox_SeriesTitleMouseClick;
void LegendBox_SeriesTitleMouseClick(MouseItemBase series)
{
SeriesBaseXY s = (SeriesBaseXY)series;
s.Visible = !s.Visible;
}
LightningChart Support Team, PT
-
- Posts: 43
- Joined: Mon Oct 19, 2015 2:50 am
Re: Chart legend, extending checkbox hitbox to include strin
Wondeful! I will give this a try and let you know if i run into any additional problems...