У меня есть проблема, связанная с RadChart
.Здесь я хочу взять имя по оси x и время по оси y, чтобы мои DataTable
имели данные в формате времени при привязке этих столбцов к RadChart
.Я получаю эту ошибку:
Тип столбца с именем TargetedResponseTime не является числовым
Как изменить параметры диаграммы в формате времени
C #:
chartBronze.DataSource = dt_Bronze;
chartBronze.PlotArea.XAxis.DataLabelsColumn = "TicketPriority";
chartBronze.Series[0].DataYColumn = "TargetedResponseTime";
chartBronze.Series[1].DataYColumn = "AverageResponseTime";
chartBronze.DataBind();
ASPX:
<telerik:RadChart ID="chartBronze" runat="server" onitemdatabound="chartBronze_ItemDataBound" >
<Appearance Corners="Round, Round, Round, Round, 7">
<FillStyle MainColor="226, 247, 255">
</FillStyle>
<Border Color="82, 160, 226" />
</Appearance>
<PlotArea>
<Appearance Dimensions-Width="70%" Dimensions-AutoSize="False" Dimensions-Height="60%"
Dimensions-Margins="30%, 24%, 12%, 20%">
<FillStyle FillType="Solid" MainColor="White">
</FillStyle>
<Border Color="180, 210, 236" />
</Appearance>
<XAxis>
<Appearance Color="Black" MajorTick-Color="Brown" >
<LabelAppearance Position-AlignedPosition="TopLeft">
</LabelAppearance>
<MajorGridLines Visible="false" />
<MinorGridLines Visible="false" />
<TextAppearance TextProperties-Color="Black" TextProperties-Font="callabri">
</TextAppearance>
</Appearance>
</XAxis>
<YAxis AutoScale="false" MaxValue="60" MinValue="00" LabelStep="12">
<Appearance Color="Black" MajorTick-Color="Brown" >
<MajorGridLines Color="Black"/>
<MinorGridLines Visible="false" />
<TextAppearance TextProperties-Color="Black" TextProperties-Font="callabri">
</TextAppearance>
</Appearance>
</YAxis>
</PlotArea>
<ChartTitle>
<Appearance Position-AlignedPosition="Top">
<FillStyle MainColor="226, 247, 255" SecondColor="226, 247, 255">
</FillStyle>
</Appearance>
<TextBlock Text="SLA Bronze">
<Appearance TextProperties-Color="Chocolate" TextProperties-Font="Calibri, 15pt">
<FillStyle MainColor="226, 247, 255" SecondColor="226, 247, 255">
</FillStyle>
</Appearance>
</TextBlock>
</ChartTitle>
<Legend>
<Appearance Position-AlignedPosition="TopRight">
<ItemTextAppearance TextProperties-Color="Black">
</ItemTextAppearance>
<ItemMarkerAppearance Figure="Rectangle">
</ItemMarkerAppearance>
<FillStyle MainColor="" SecondColor="">
</FillStyle>
<Border Color="" />
</Appearance>
<TextBlock>
<Appearance Position-AlignedPosition="Center">
</Appearance>
</TextBlock>
</Legend>
<Series>
<telerik:ChartSeries Name="Targeted Response Time">
<Appearance>
<FillStyle FillType="Solid" MainColor="Yellow">
</FillStyle>
<TextAppearance TextProperties-Color="Brown">
</TextAppearance>
</Appearance>
</telerik:ChartSeries>
<telerik:ChartSeries Name="Avg Response Time">
<Appearance>
<FillStyle FillType="Solid" MainColor="CadetBlue">
</FillStyle>
<TextAppearance TextProperties-Color="Brown">
</TextAppearance>
</Appearance>
</telerik:ChartSeries>
<telerik:ChartSeries Name="Targeted Resolution Time">
<Appearance>
<FillStyle FillType="Solid" MainColor="LightGreen">
</FillStyle>
<TextAppearance TextProperties-Color="Brown">
</TextAppearance>
</Appearance>
</telerik:ChartSeries>
<telerik:ChartSeries Name="Avg Resolution Time" >
<Appearance>
<FillStyle FillType="Solid" MainColor="DarkOrange">
</FillStyle>
<TextAppearance TextProperties-Color="Brown">
</TextAppearance>
</Appearance>
</telerik:ChartSeries>
</Series>
</telerik:RadChart>