MSchart 双Y轴 高手解答
1个回答
展开全部
<series><asp:series Name="Series1" ChartType="FastLine" Color="Orange" BorderColor="Red"></asp:series>
</series>
<Series>
<asp:series Name="Series2" ChartType="Column" BorderColor="Black" Color="#89BDF0" ></asp:series>
</Series>
<chartareas> <asp:chartarea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="Gainsboro" BackGradientStyle="TopBottom"> <axisy linecolor="64, 64, 64, 64" IsLabelAutoFit="False"> <labelstyle font="Trebuchet MS, 8.25pt, style=Bold" /> <majorgrid linecolor="64, 64, 64, 64" /> </axisy> <AxisY2 linecolor="64, 64, 64, 64" IsLabelAutoFit="False"> <labelstyle font="Trebuchet MS, 8.25pt, style=Bold" /> <majorgrid linecolor="64, 64, 64, 64" /> </AxisY2>
<axisx linecolor="64, 64, 64, 64" IsLabelAutoFit="False">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisx></asp:chartarea>
</chartareas>
//第一个Series使用Primary
chart1.Series[0].YAxisType = AxisType.Primary;
chart1.Series[0].XAxisType = AxisType.Primary;
//第二个Series使用Secondary
chart1.Series[1].YAxisType = AxisType.Secondary;
后台赋值就可以了……
</series>
<Series>
<asp:series Name="Series2" ChartType="Column" BorderColor="Black" Color="#89BDF0" ></asp:series>
</Series>
<chartareas> <asp:chartarea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="Gainsboro" BackGradientStyle="TopBottom"> <axisy linecolor="64, 64, 64, 64" IsLabelAutoFit="False"> <labelstyle font="Trebuchet MS, 8.25pt, style=Bold" /> <majorgrid linecolor="64, 64, 64, 64" /> </axisy> <AxisY2 linecolor="64, 64, 64, 64" IsLabelAutoFit="False"> <labelstyle font="Trebuchet MS, 8.25pt, style=Bold" /> <majorgrid linecolor="64, 64, 64, 64" /> </AxisY2>
<axisx linecolor="64, 64, 64, 64" IsLabelAutoFit="False">
<labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />
<majorgrid linecolor="64, 64, 64, 64" />
</axisx></asp:chartarea>
</chartareas>
//第一个Series使用Primary
chart1.Series[0].YAxisType = AxisType.Primary;
chart1.Series[0].XAxisType = AxisType.Primary;
//第二个Series使用Secondary
chart1.Series[1].YAxisType = AxisType.Secondary;
后台赋值就可以了……
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询