Stacked Bar


Author
Message
John Burcher
John Burcher
Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)Junior Member (15 reputation)
Group: Forum Members
Posts: 15, Visits: 1
Hi,

I have a stacked bar chart with 12 bar series. I have 2 issues at this stage:-
1. When I apply a stylesheet (PredefinedStyleSheet.Bright), it only seems to have 6 colours. How do I get at least 12 predefined colours?
2. The legend looks out of space when I try attaching it.

I have included the actual chart to help.

Your urgent assistance would be most appreciated.

Thank you!
Attachments
2.png (46 views, 103.00 KB)
Reply
Milen
Milen
Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)Forum Member (48 reputation)
Group: Nevron Team
Posts: 48, Visits: 1

Hi John,

The easiest way is to set individual fill and stroke for each series, for example:

    series1.FillStyle = new NColorFillStyle(Color.Red);
    series1.BorderStyle = new NStrokeStyle(1, Color.Red);

    series2.FillStyle = new NColorFillStyle(Color.Green);
    series2.BorderStyle = new NStrokeStyle(1, Color.Green);

You can also apply a stylesheet with predefined palette first, and then overwrite the colors for some of the series.

Alternatively, you create a custom palette (NChartPalette type) and use the NStyleSheet.CreateFromPalette method to create a stylesheet from it. The NChartPalette type has a list of series colors (see the SeriesColors property).

Best Regards,
Milen


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search