Hi,
I am witnessing some strange behaviour in my HtmlChart.
When displaying unstacked data everything looks fine (first attched file).
But when turning staking on, for some reason some of the columns parts look 1000 times bigger than they should (second attached file).
The data is strictly the same in these 2 examples, the only difference is turning line.Stacked true or false, nowhere in the code do we multiply any value by 1000.
Telerik Web UI is version 2017.1.118.45.
The same page works perfectly with Telerik Web UI 2014.1.403.40.
Is it a known issue? Is there any known solution?
Here is the ascx code:
<
radS:RadHtmlChart
runat
=
"server"
ID
=
"RadHtmlChart1"
Width
=
"1000px"
Height
=
"500px"
>
<
PlotArea
>
<
XAxis
DataLabelsField
=
"day"
>
<
TitleAppearance
Text
=
"Days"
Visible
=
"true"
></
TitleAppearance
>
<
LabelsAppearance
DataFormatString
=
"{0}"
/>
<
MinorGridLines
Visible
=
"false"
></
MinorGridLines
>
<
MajorGridLines
Visible
=
"false"
></
MajorGridLines
>
</
XAxis
>
<
YAxis
>
<
TitleAppearance
Text
=
"Count"
Visible
=
"true"
></
TitleAppearance
>
<
LabelsAppearance
DataFormatString
=
"{0}"
></
LabelsAppearance
>
<
MinorGridLines
Visible
=
"false"
></
MinorGridLines
>
</
YAxis
>
</
PlotArea
>
<
Legend
>
<
Appearance
Visible
=
"true"
></
Appearance
>
</
Legend
>
</
radS:RadHtmlChart
>
The binding part in the C#:
RadHtmlChart1.PlotArea.Series.Clear();
for
(
int
i=1; i<dtTemp.Columns.Count;i++)
{
Telerik.Web.UI.ColumnSeries line =
new
Telerik.Web.UI.ColumnSeries();
line.Name =
string
.Format(
"{0} ({1})"
,Names[i],Totals[i]);
line.Stacked =
true
;
//line.Stacked = false;
line.LabelsAppearance.Visible =
false
;
line.LabelsAppearance.DataFormatString =
"{0}"
;
line.DataFieldX =
"day"
;
line.DataFieldY = dtTemp.Columns[i].ColumnName;
RadHtmlChart1.PlotArea.Series.Add(line);
}
RadHtmlChart1.DataSource = dtTemp;
RadHtmlChart1.DataBind();
Thank you.