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
65
Columns Width
posted

hello, how can i set width in my chart?

i don't want it to automatic resize..

 

when i don't have many data on my datatable, it resize to a larger size and i don't like it.

 

i want anything like it... \/

Parents
  • 155
    Suggested Answer
    posted

    I've done it like this:

    on your chart:

    chart.FillSceneGraph += new Infragistics.UltraChart.Shared.Events.FillSceneGraphEventHandler(ChartFillSceneGraph);

     

    And the ChartFillSceneGraph-Method like this:

        void ChartFillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e)
        {
            int newXValue = 90;
            foreach (Primitive p in e.SceneGraph)
            {
                Box box = p as Box;
                if (box != null && box.Layer != null)
                {              
                   box.rect.Width = 80;
                   box.rect.X = newXValue
                   newXValue = newXValue + 100;
                }           
            }
        }

Reply Children