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
290
Composite chart of columns and lines
posted

Please suggest how would I create such a chart

https://www.dropbox.com/s/ckpd7ss7of7pjt7/chart.png

The sample browser doesn't have any sample for UltraChart, only for UltraDataChart (which is very ugly)

Parents Reply Children
  • 21795
    Verified Answer
    Offline posted in reply to Mitja Starman

    Hi Mitja,

    There are several ways to set custom colors for your chart via chart’s ColorModel. One way is to apply global colors for all the chart elements. To do so you need to set ModelStyle to CustomLinear and add some colors in CustomPallete like this:

    this.ultraChart1.ColorModel.ModelStyle = ColorModels.CustomLinear;
    this.ultraChart1.ColorModel.CustomPalette = new Color[] { Color.Blue, Color.Red };

    If you need more complex appearance, e.g. gradients, for you chart you can also achieve this via series paint elements collection like this:

    //  Clear the paint elements collection
    series.PEs.Clear();
                   
    //  Add solid color
    series.PEs.Add(new PaintElement(Color.Blue));
                   
    //  Add gradient style fill
    series.PEs.Add(new PaintElement(
        Color.Red                                 // Fill Color
        , Color.White                            // Fill Stop Color
        , GradientStyle.HorizontalBump // Gradient Style
        ));

    Note that paint element’s constructor has several overloads. More information you may find in our online documentation here.

    Attached is same project I sent you last time with colors applied as you need them.

    Please let me know if any further questions arise.

    UltraChartCompositeChart_03.zip