我一个图表中X轴是日期,Y轴就两项,一个是数量,另一个是金额,结果在图例区会显示三个:蓝色: Series1
澄色: 数量
红色: 金额这是为什么?但是用 Chart1.Series["Series1"].IsVisibleInLegend = false; 可以把它隐藏掉,只是搞不明白.Chart1.Series["Series1"] 这个不是指 数量吗?
前台chart中有:
<legends>
<asp:Legend IsTextAutoFit="False" Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold">
</asp:Legend>
</legends>
后台绑定:
sql="SELECT A.TG003 月份,SUM(TH8) 数量,SUM(TH37) 金额 FROM ...";
Chart1.DataBindTable(ds.Tables[0].DefaultView, "月份"); // 绑定 X 轴数据列
Chart1.Series[0].ChartArea = "ChartArea1";
Chart1.Series[1].ChartArea = "ChartArea2";按理说Chart1.Series[0]应该是数量,Chart1.Series[1]应该是金额,但是在Chart图表上却是反过来的,两个ChartArea,
ChartArea1显示的是金额的信息, ChartArea2显示的数量的信息.
Chart1.Series[0].ChartArea = "ChartArea1";
Chart1.Series[1].ChartArea = "ChartArea2";
这两句如果把等号右边反过来写就会两个在一个ChartArea中,不符合要求.谁能详细解释一下?
澄色: 数量
红色: 金额这是为什么?但是用 Chart1.Series["Series1"].IsVisibleInLegend = false; 可以把它隐藏掉,只是搞不明白.Chart1.Series["Series1"] 这个不是指 数量吗?
前台chart中有:
<legends>
<asp:Legend IsTextAutoFit="False" Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold">
</asp:Legend>
</legends>
后台绑定:
sql="SELECT A.TG003 月份,SUM(TH8) 数量,SUM(TH37) 金额 FROM ...";
Chart1.DataBindTable(ds.Tables[0].DefaultView, "月份"); // 绑定 X 轴数据列
Chart1.Series[0].ChartArea = "ChartArea1";
Chart1.Series[1].ChartArea = "ChartArea2";按理说Chart1.Series[0]应该是数量,Chart1.Series[1]应该是金额,但是在Chart图表上却是反过来的,两个ChartArea,
ChartArea1显示的是金额的信息, ChartArea2显示的数量的信息.
Chart1.Series[0].ChartArea = "ChartArea1";
Chart1.Series[1].ChartArea = "ChartArea2";
这两句如果把等号右边反过来写就会两个在一个ChartArea中,不符合要求.谁能详细解释一下?
解决方案 »
- 希望高手能够进来帮助,新手可以进来学习!
- jquery 访问 ashx 的小问题,坐等
- 用了<script>alert('请先登录');window.open('Main.aspx')遨游拦截 用了Redirect没有必要的提示怎么办啊?
- string.Format("{0:hh:mm:ss}","2005-8-28 23:00:00") 怎么得到的是 11:00:00 我想得到的是23:00:00 该怎么做?
- 求助:网络环境导致session 串号问题
- 框架提交提回弹出一个新窗的问题
- 做这个网站应该出价多少??http://www.xgzxdz.com/
- 关于文本框的输入数据库的奇怪问题!
- sql语句的错误,其中的一段,大家帮帮忙
- 急问,连接池超时问题?
- 使用AspNetPager控件,出现JS错误:doCheckPageSize is not defined
- 如何逐行显示
Palette="BrightPastel" imagetype="Png"
BorderDashStyle="Solid" BackSecondaryColor="White"
BackGradientStyle="TopBottom" BorderWidth="2" backcolor="#D3DFF0"
BorderColor="26, 59, 105">
<legends>
<asp:Legend IsTextAutoFit="False" Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold">
</asp:Legend>
</legends>
<borderskin skinstyle="Emboss"></borderskin>
<series>
<asp:Series Name="Series1" BorderColor="180, 26, 59, 105"></asp:Series>
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White"
BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
<area3dstyle Rotation="10" perspective="10" Inclination="15" IsRightAngleAxes="False" wallwidth="0" IsClustered="False"></area3dstyle>
<axisy linecolor="64, 64, 64, 64">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisy>
<axisx linecolor="64, 64, 64, 64">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisx>
</asp:ChartArea>
<asp:ChartArea Name="ChartArea2" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White"
BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">
<area3dstyle Rotation="10" perspective="10" Inclination="15" IsRightAngleAxes="False" wallwidth="0" IsClustered="False"></area3dstyle>
<axisy linecolor="64, 64, 64, 64">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisy>
<axisx linecolor="64, 64, 64, 64">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisx>
</asp:ChartArea>
</chartareas>
</asp:chart>