将文本放在条形图上 [英] Placing text on a bar chart

查看:90
本文介绍了将文本放在条形图上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨sipla和every1再次

hi sipla and every1 again




现在只在第一个范围栏中,除了右边的标签(显示的数量)我想在
的中间放置一个自定义文本

now only in the first range bar besides label at right(amount shown) i want to place a custom text in the middle of

我在上面显示为"酒吧自定义文字"的栏...我该怎么办?帮助其它可能需要花费太多时间..

the bar which i showed above as 'custom text in bar'...how do i do? help else it may take too much time..

谢谢

推荐答案

一种选择是起诉StripLines。您可以使用Interval,Stripwidth和Interval偏移属性获得所需内容。

One option is to sue StripLines. You might get what you want using the Interval, Stripwidth and Interval offset attributes.

<asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BackSecondaryColor="White" BackColor="OldLace" ShadowColor="Transparent" BackGradientStyle="TopBottom">
  <area3dstyle Rotation="10" Perspective="10" Inclination="15" IsRightAngleAxes="False" WallWidth="0" IsClustered="False" />
  <axisy LineColor="64, 64, 64, 64"  LabelAutoFitMaxFontSize="8">
    <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" Format="C0" />
    <MajorGrid LineColor="64, 64, 64, 64" />
  </axisy>
  <axisx LineColor="64, 64, 64, 64"  LabelAutoFitMaxFontSize="8">
    <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" IsEndLabelVisible="False" Format="MM-dd" />
    <MajorGrid LineColor="64, 64, 64, 64" />
    <striplines>
      <asp:stripline StripWidth="1" Interval="1" IntervalOffset="0.5" BackColor="64, 191, 191, 191"></asp:stripline>
    </striplines>
  </axisx>
</asp:ChartArea>

设置带状线文字的代码:

Code to set the stripline text:

StripLine stripLine = Chart1.ChartAreas["ChartArea1"].AxisX.StripLines[0];
stripLine.Text = "Whatever text you want";

希望这会有所帮助,

谢谢,





这篇关于将文本放在条形图上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆