Is there a way to turn off the highlight tool tip for the Histogram line only? I still want the tool tips and highlighting for the columns.
-Ken
Hello,
In order to draw an element onto the chart you should handle OnFillSceneGraph event. Then you should to create an instance of primitive that you want to draw, set point (location of this element). It will be good if you associate this primitive with data point of the chart, and then to add this primitive to SceneGraph of the argument. You should use code like this:
ChartLayer layer = e.ChartCore.GetChartLayer();
//this primitive represent histogram line
IEnumerable<Polyline> pl = layer.ChartCore.SceneGraph.OfType<Polyline>();
if (pl.Count<Polyline>() > 0)
{
Polyline pol = pl.First<Polyline>();
//iterate trough all data point of the histogram to find these point
//which matches to some condition
foreach (DataPoint dp in pol.points)
if (dp.Value != null && ((double)dp.Value) > 0.08d)
//create a primitive (in this case this is a symbol)
Infragistics.UltraChart.Core.Primitives.Symbol symbol = new Symbol(Infragistics.UltraChart.Shared.Styles.SymbolIcon.Plus, Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Medium);
symbol.DataPoint = dp.DataPoint;
symbol.fillColor = Color.Violet;
symbol.PE.Fill = Color.Violet;
symbol.Layer = dp.Layer;
symbol.point = dp.point;
//add primitive to the ScreneGraph
e.SceneGraph.Add(symbol);
}
Let me know if you have any further questions.
That worked...thanks!
BTW: Are there any samples that show how to draw extra lines onto column graphs or histograms? I need to draw some marker lines to represent AUR and other values.
thanks
In order to remove labels and HitTest from line part of histogram chart you should handle OnDataItemOver event of UltraCahrt and add there the following code snippet:
if (e.Primitive is DataPoint)
((DataPoint)e.Primitive).Caps = PCaps.None;