如何自定义图例中的文字。我正在使用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>
答案 0 :(得分:1)
我认为这不是一个传奇,因此,我认为你不能这样做。
我建议您首先浏览控制文档并浏览可用的属性,以查看某些内容是否对您有用:
另一个想法是从您的数据源构建自定义图例。您可以在此处查看示例方法http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/custombarcolor/defaultcs.aspx,即使该图表是当前的RadHtmlChart控件(不推荐使用RadChart以支持此较新的图表控件)。