I need to display a composite chart with several chartareas, each one displaying a different title similar to what titleleft does for the whole chart.
I also want to track when a user clicked in a specific ChartArea.
Is it possible to achieve this things?How can I do it?
Perfect! That's what I was missing.Thanks a lot!
Maybe you're missing PCapc.Tooltip on your box shape. Here's a code snippet that shows which properties need to be set in order for a new box shape to participate in the chart data clicked event:
Box b = new Box(new Point(200, 200), 100, 100);b.Row = b.Column = 0;b.Caps = PCaps.HitTest | PCaps.Tooltip;b.DataPoint = new NumericDataPoint(1, "point", false);b.Layer = e.ChartCore.GetChartLayer();b.PE.Fill = Color.Red;e.SceneGraph.Add(b);
Hi, sorry to bring an old thread back to life, but the following grabbed my attention:
Is this intended to imply that, given some tweaking, the ChartDataClicked event can be made to capture clicks on parts of a graph other than the data points? If so that would be excellent, and I'd love to know how. I want to have an area (box, text, whatever) on a graph such that when it's clicked, I can export the graph data (manually, in server-side code).
I've tried adding the "HitTest" capability to a random box, as well as assigning it a row and column, assigning it's DataPoint property, Path, Layer, etc all to try to make it look like a data point such that it might trigger the ChartDataClicked event, with no luck.
Note that I'm creating this chart entirely in C# code, and I've been trying to add the "export" box in the FillSceneGraph event.
Thanks for any help!
There aren't any title properties that are specific to any particular chart element other than the entire chart. I think it's best to use annotations, which can be absolutely positioned anywhere on the chart using either pixel or percent based coordinates. You can calculate the location of your annotation based on each of the chart area's bounds. You can find more about annotations here:http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Chart_Create_Annotations.html
By default you can only click on the chart's data points, so if that's what you're looking for, you can do something like this:protected void UltraChart1_ChartDataClicked(object sender, Infragistics.UltraChart.Shared.Events.ChartDataEventArgs e){ foreach (ChartLayerAppearance layer in this.UltraChart1.CompositeChart.ChartLayers) { if (layer.Key.Equals(e.LayerID)) { Debug.WriteLine(layer.ChartArea.Key); } }}