Skip to content

StackedBarChart fails with one bar #75

@bennoafk

Description

@bennoafk

Hello,

I seem to have a problem with the stacked bar charts when you only have one dataset.

i.e. the following data source doesn't work:

Random rnd = new Random();
// Note that because of C# tuples are invariant, we have to declare the tuple as
// (string, IReadOnlyList) instead of (string, double[]) - we can still use
// a double[] for the second item of the tuple, though.
(string, IReadOnlyList)[] data = new (string, IReadOnlyList)[] {
( "Category 1", new double[] { rnd.Next(1, 10), rnd.Next(1, 10), rnd.Next(1, 10) } ) };

// Create the bar chart using the random data and the default settings.
Plot plot = Plot.Create.StackedBarChart(data);

All the best,
Ben

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions