amchart 柱状图 请问是否可以有2个Y坐标!其中一个是折线图使用百分比,具体怎么实现! 20
amchart柱状图请问是否可以有2个Y坐标!其中一个是折线图使用百分比,具体怎么实现!AmChart.Graphs.Clear();//立体感觉深度AmChart.De...
amchart 柱状图 请问是否可以有2个Y坐标!其中一个是折线图使用百分比,具体怎么实现!
AmChart.Graphs.Clear();
//立体感觉深度
AmChart.Depth = 10;
//动态升长时间
AmChart.ColumnGrowTime = 5;
AmChart.Width = new Unit(700);
AmChart.Height = new Unit(500);
AmChart.PlotAreaBackgroundColor = Color.Yellow;
AmChart.ChartDirectory = "~/amcharts/amcolumn/";
//柱型1
ColumnChartGraph ccg1 = new ColumnChartGraph();
ccg1.DataSource = ds;
ccg1.DataSeriesItemIDField = "year";
ccg1.Title = "企业销售分析";
ccg1.DataValueField = "xiaoshou";
//形状,可以是柱型,也可以是线型
AmChart.PlotAreaBackgroundAlpha = Convert.ToByte(20);
//Y轴值在右边(默认在左边)
ccg1.GraphType = ColumnChartGraphTypes.Column;
AmChart.Graphs.Add(ccg1);
//折线1
ColumnChartGraph ccg2 = new ColumnChartGraph();
ccg2.DataSource = ds;
ccg2.DataSeriesItemIDField = "year";
ccg2.Title = "企业销售增长分析";
ccg2.DataValueField = "Growth";
//形状,可以是柱型,也可以是线型
ccg2.Bullet = ColumnChartBulletTypes.RoundOutline;
ccg2.GraphType = ColumnChartGraphTypes.Line;
AmChart.Graphs.Add(ccg2);
//配置上面显示的文字格式
AmChart.ColumnDataLabelFormatString = "{value}";
AmChart.LineBalloonTextFormatString = "{value}";
AmChart.DataSource = ds;
AmChart.DataSeriesIDField = "year"; 展开
AmChart.Graphs.Clear();
//立体感觉深度
AmChart.Depth = 10;
//动态升长时间
AmChart.ColumnGrowTime = 5;
AmChart.Width = new Unit(700);
AmChart.Height = new Unit(500);
AmChart.PlotAreaBackgroundColor = Color.Yellow;
AmChart.ChartDirectory = "~/amcharts/amcolumn/";
//柱型1
ColumnChartGraph ccg1 = new ColumnChartGraph();
ccg1.DataSource = ds;
ccg1.DataSeriesItemIDField = "year";
ccg1.Title = "企业销售分析";
ccg1.DataValueField = "xiaoshou";
//形状,可以是柱型,也可以是线型
AmChart.PlotAreaBackgroundAlpha = Convert.ToByte(20);
//Y轴值在右边(默认在左边)
ccg1.GraphType = ColumnChartGraphTypes.Column;
AmChart.Graphs.Add(ccg1);
//折线1
ColumnChartGraph ccg2 = new ColumnChartGraph();
ccg2.DataSource = ds;
ccg2.DataSeriesItemIDField = "year";
ccg2.Title = "企业销售增长分析";
ccg2.DataValueField = "Growth";
//形状,可以是柱型,也可以是线型
ccg2.Bullet = ColumnChartBulletTypes.RoundOutline;
ccg2.GraphType = ColumnChartGraphTypes.Line;
AmChart.Graphs.Add(ccg2);
//配置上面显示的文字格式
AmChart.ColumnDataLabelFormatString = "{value}";
AmChart.LineBalloonTextFormatString = "{value}";
AmChart.DataSource = ds;
AmChart.DataSeriesIDField = "year"; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询