【问题标题】:Cannot reposition axes in bar graph OxyPlot xamarin无法在条形图中重新定位轴 OxyPlot xamarin
【发布时间】:2014-08-04 05:41:06
【问题描述】:

我在 android xamarin 中显示了一个条形图。我想显示一个包含 3 个类别的简单条形图。

我想要什么:-

我得到了什么:-

所以目前我的图表是水平显示的。我希望它如图 1 所示。

这是我的代码:-

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;

【问题讨论】:

    标签: android graph xamarin.android oxyplot


    【解决方案1】:

    您应该查找 ColumnSeries 而不是 BarSeries。它会给你你正在寻找的水平图。

    【讨论】:

      猜你喜欢
      • 2017-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-24
      • 1970-01-01
      • 1970-01-01
      • 2016-08-25
      • 1970-01-01
      相关资源
      最近更新 更多