【问题标题】:Customized legend for RadChartRadChart 的自定义图例
【发布时间】:2015-01-20 22:02:25
【问题描述】:

如何自定义图例中的文本。我正在使用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>  

【问题讨论】:

    标签: asp.net charts telerik


    【解决方案1】:

    我不认为这就是传奇的意义,因此,我认为你不能做到这一点。

    我建议您首先浏览控制文档并探索可用属性以查看某些内容是否对您有用:

    另一个想法是从您的数据源构建自定义图例。即使图表是当前的 RadHtmlChart 控件,您也可以在 http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/custombarcolor/defaultcs.aspx 看到示例方法(不推荐使用 RadChart 以支持这个较新的图表控件)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-08
      • 2019-04-13
      • 2014-08-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多