Hi,
I'm having a problem with the X and Y axis titles of a ScatterLine Chart. I am binding data to the chart server-side and when I add no series to the chart then the Axis Titles display fine. However, when I add a list of ScatterLineSeries via the PlotArea.Series.AddRange function then the data gets added, but my Axis Titles disappear. I've tried setting the Axis Titles in the ASP markup at design time and via C# code but neither seem to do anything. Note: In the server-side C# code I only tried setting the X-Axis title.
Please see my code blocks below:
I'm having a problem with the X and Y axis titles of a ScatterLine Chart. I am binding data to the chart server-side and when I add no series to the chart then the Axis Titles display fine. However, when I add a list of ScatterLineSeries via the PlotArea.Series.AddRange function then the data gets added, but my Axis Titles disappear. I've tried setting the Axis Titles in the ASP markup at design time and via C# code but neither seem to do anything. Note: In the server-side C# code I only tried setting the X-Axis title.
Please see my code blocks below:
public
void
BindWaterFlowRateChart(List<ScatterLineSeries> WaterFlowRateSeries)
{
WaterFlowRateChart.PlotArea.Series.Clear();
WaterFlowRateChart.PlotArea.Series.AddRange(WaterFlowRateSeries);
WaterFlowRateChart.Legend.Appearance.Visible =
true
;
WaterFlowRateChart.PlotArea.XAxis.AxisCrossingValue = 0;
WaterFlowRateChart.PlotArea.XAxis.Visible =
true
;
WaterFlowRateChart.PlotArea.XAxis.TitleAppearance.Text =
"Time (min)"
;
WaterFlowRateChart.PlotArea.XAxis.TitleAppearance.Position = AxisTitlePosition.Center;
WaterFlowRateChart.PlotArea.XAxis.TitleAppearance.Visible =
true
;
}
<
telerik:RadHtmlChart
runat
=
"server"
ID
=
"WaterFlowRateChart"
>
<
ChartTitle
Text
=
"Water Flow Rate Summary"
/>
<
Legend
>
<
Appearance
BackgroundColor
=
"White"
Position
=
"Right"
></
Appearance
>
</
Legend
>
<
PlotArea
>
<
XAxis
AxisCrossingValue
=
"0"
>
<
TitleAppearance
Text
=
"Time (min)"
Position
=
"Center"
Visible
=
"True"
/>
</
XAxis
>
<
YAxis
AxisCrossingValue
=
"0"
>
<
TitleAppearance
Text
=
"Flow Rate (gal/min)"
Position
=
"Center"
Visible
=
"True"
/>
</
YAxis
>
</
PlotArea
>
</
telerik:RadHtmlChart
>