I have displayed a bar graph in android xamarin. I want to display a simple bar graph with 3 categories.
What I want:-
What I get :-
So currently my graph is showing horizontally. I want it to show as in figure 1.
Here is my code:-
var plotModel1 = new PlotModel();
plotModel1.LegendOrientation = LegendOrientation.Vertical;
plotModel1.PlotAreaBorderColor = OxyColors.White;
var barSeries1 = new BarSeries();
for (int i = 0; i < barValues.Length && i < colorPallete.Length && i<barTitles.Length; i++)
{
barSeries1.Items.Add(new BarItem(barValues[i], -1) { Color = OxyColor.Parse(colorPallete[i]) });
}
plotModel1.Series.Add(barSeries1);
MyModel = plotModel1;
barPlotView.Model = MyModel;
0 comments:
Post a Comment