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
370
2D column Infragistic graph X & Y- axix data formatting.
posted

Hello,

I am working with the 2D Column Infragistic graph where I have the graph coming like the image given below.

In the Y-axix we have the data here in millions .I want this to be like -1.5 to 3.0 in millions.I have tried various formatting styles here but the result is same.Then also tried <Data_Value:0'.'######>

This gave me the result with -1.5 00000 to 3.000000 .But this is not required.

 

Would any one please suggest me how to format the y-a xix data..

 

Parents
No Data
Reply
  • 53790
    Suggested Answer
    posted

    Hello Manaswini,

     

    Maybe one possible approach is to handle ultraChart1_FillSceneGraph() event and modify your Text primitives with removing unnecessary part of the label of your Y axis. Please take a look at the code below:

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

    {

        foreach (Primitive pr in e.SceneGraph)

        {

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

            {

                string ss = ((Text)pr).GetTextString();

                if (ss.Length >= 5)

                {

                    ss = ss.Remove(3);

                    ((Text)pr).SetTextString(ss);

                }

            }

        }

    }

     

    Please let me know if you have any further questions.

    Regards

Children