Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3768

WebChart Pressed Event

$
0
0

Hi, everyone!

I build my linear chart with this code:

Var mySet1 As New WebChartLinearDataset("Series 1", Color.Red, True, 5)
mySet1.ChartType = WebChartLinearDataset.ChartTypes.Bar
mySet1.Tag = "Series1"

Charts1.AddDataset(mySet1)

Var mySet2 As New WebChartLinearDataset("Series 2", Color.Blue, True, 12)
mySet2.ChartType = WebChartLinearDataset.ChartTypes.Bar
mySet2.Tag = "Series2"

Charts1.AddDataset(mySet2)

Note the Tag property is a necessity because in a linear chart, the index parameter always returns 0 in the Pressed event, unlike if the chart type is a pie, index works perfectly.

In my chart’s Pressed event, I would like to raise an event of the parent container. However, since dataset parameter is defined as ChartData, the Tag property is not exposed.

I would like to know what series is clicked by the user.

Thank you in advance!

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3768

Trending Articles