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
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