Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1005
How to "clip" primitives to chart rectangle
posted

Hi

I dynamically add some lines, boxes and text to a chart in the FillSceneGraph event handler, which works fine, but when I switch to zoom mode and scroll the chart so that my lines, etc. are off the chart they still get drawn over the axes! :(  How can I tell the chart to clip them to the data area like all the "normal" data lines?

Thanks.

Brian

Parents
  • 17605
    Verified Answer
    posted

    You can try using:

    void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e)

    {

    ChartLayer layer = e.ChartCore.GetChartLayer();GraphicsContext context = new GraphicsContext();

    context.SetClipBounds(layer.OuterBound);

    e.SceneGraph.Add(context);

    // add your primitives here

    }

Reply Children
No Data