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
410
Change Line Appearance in Legend Independently
posted

I've figured out how to change the appearance of lines in my graph, but I want to adjust the appearance of my line series independently so that they show up a little more clearly.

For instance, I have a series represented by a line with the following chart appearance properties:

minGwElSeries = numTimeSeriesDict["minGwElSeries"];

minGwElSeries.Label = "Min GW Elev. (ft)";

minGwElSeries.PEs.Add(new PaintElement(Color.DarkGray));

LineAppearance minGwElLineApp = new LineAppearance();

minGwElLineApp.Thickness = 1;

minGwElLineApp.LineStyle.DrawStyle = LineDrawStyle.DashDotDot;

ChartLayerAppearance minGwElLayer = new ChartLayerAppearance();

minGwElLayer.ChartType = ChartType.LineChart;

 

My question is: how do I adjust the properties of how this line/series appears in my legend? It does not show up with the same appearance I have specified in the chart (i.e., it just shows up as a thin gray line). All of the other lines in the chart show up in the legend as these thin lines and the colors are hard to distinguish. I want to make the lines thicker, longer, and have dashes/dash-dots/etc.)

Any suggestions?? Thanks in advance for any assistance.

 

Parents
No Data
Reply
  • 53790
    posted

    Hello Jrubengb,

    Maybe one possible approach to achieve desire behavir is to handle ultraChart1_FillSceneGraph() event and include for example such kind of code.

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

    {

        foreach (Primitive pr in e.SceneGraph)

        {

            if (pr.GetType() == typeof(Symbol))

            {

                ((Symbol)pr).PE.Fill = Color.Red;

            }

        }

    }

    Please let me know if you have any questions.

    Regards

Children
No Data