如何自定义图例中的文本。我正在使用telerik工具。如何从后端更改图例文本?c#或vb.net代码就足够了。根据客户需求,我需要显示来自x轴和y轴的组合文本,并在图例中显示。下面是用于此的代码。
<telerik:radchart id="radchart_teamchart" autolayout="true" charttitle-appearance-fillstyle-fillsettings-imagealign="Center"
chartimageformat="Png" charttitle-visible="true" seriesorientation="Vertical"
width="900px" defaulttype="Bubble" runat="server" skin="Vista" autotextwrap="true"
intelligentlabelsenabled="true">
<ChartTitle TextBlock-Text="My New Customer Status">
</ChartTitle>
<Series>
<telerik:ChartSeries DataYColumn="noofcustomer" Name="Order" Type="Bar" Appearance-BarWidthPercent="10">
<Appearance LabelAppearance-Visible="false">
<TextAppearance TextProperties-Font="Cambria, 8.25pt" Position-AlignedPosition="TopLeft">
</TextAppearance>
<FillStyle MainColor="DarkOrange" SecondColor="WhiteSmoke" FillType="Gradient">
</FillStyle>
<PointMark Visible="True" Border-Width="2" Border-Color="DarkKhaki" Dimensions-AutoSize="false"
Dimensions-Height="10px" Dimensions-Width="6px">
<FillStyle MainColor="Red" FillType="solid">
</FillStyle>
</PointMark>
<LineSeriesAppearance Width="6"></LineSeriesAppearance>
</Appearance>
</telerik:ChartSeries>
</Series>
<PlotArea>
<XAxis DataLabelsColumn="month" AxisLabel-Visible="true" AxisLabel-TextBlock-Text="Month"
AxisLabel-TextBlock-Appearance-TextProperties-Color="Brown">
<Appearance>
<TextAppearance TextProperties-Font="Arial, 8.25pt, style=Bold" Dimensions-Paddings="0.5px">
</TextAppearance>
<LabelAppearance RotationAngle="270">
</LabelAppearance>
</Appearance>
</XAxis>
<YAxis AxisMode="Normal" MaxItemsCount="7" AxisLabel-Visible="true" AxisLabel-TextBlock-Text="No Of Cusotmers"
AxisLabel-TextBlock-Appearance-TextProperties-Color="Brown">
<Appearance>
<TextAppearance TextProperties-Font="Arial, 8.5pt, style=Bold">
</TextAppearance>
</Appearance>
</YAxis>
</PlotArea>
<Legend Visible="true" ></Legend>
</telerik:radchart> 发布于 2015-01-20 14:02:25
我不认为这是一个传奇,因此,我认为你不能这样做。
我建议您首先查看控件文档,并探索可用的属性,以确定某些内容是否对您有用:
另一个想法是从数据源构建自定义图例。您可以在这里看到一个示例方法( http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/custombarcolor/defaultcs.aspx ),尽管图表是当前的RadHtmlChart控件(对于这个较新的图表控件来说,RadChart是不推荐的)。
https://stackoverflow.com/questions/28038084
复制相似问题