Hi Telerik,
We are facing two issues when we are using Stepline series.
ISSUE 1 :
When there is only one category / data point then chart is not drawing . We have such cases and we need solution or workaround for this case
<
telerik:StepLineSeries
>
<
telerik:StepLineSeries.DataPoints
>
<
telerik:CategoricalDataPoint
Category
=
"1"
Value
=
"1.0"
/>
<!--<
telerik:CategoricalDataPoint
Category
=
"2"
Value
=
1
.1" />
<
telerik:CategoricalDataPoint
Category
=
"3"
Value
=
"1.0"
/>
<
telerik:CategoricalDataPoint
Category
=
"4"
Value
=
"1.1"
/>-->
</
telerik:StepLineSeries.DataPoints
>
</
telerik:StepLineSeries
>
ISSUE 2 :
We are using marked zone but marking falling in between and not from beginning so we used margin workaround from telerik to fix (Please see code from attached xaml.cs file)
Before Shifting
See image
After Shifting
See image
BELOW CODE USED TO ALIGN MARGIN
int categoriesCount = this.horizontalAxis.Categories.Count();
double categorySlotSize = this.chart.PlotAreaClip.Width * this.chart.Zoom.Width / categoriesCount;
var margin = new Thickness(-(categorySlotSize / 2), 0, 0, 0);
if (!margin.ToString().Contains("Infinity"))
{
this.chart.Annotations.Where(x => x is CartesianMarkedZoneAnnotation).ToList()
.ForEach(m => { m.Margin = margin; });
}
But we are facing issue when we zoom the chart.The marking going out of actual area.Please help to resolve it.
After Zooming
See Image
ISSUE 3 :
When we are using marking for last category then the marking done for half way only.Please help to draw until end (Need to support while zooming as well)
<
telerik:StepLineSeries
>
<
telerik:StepLineSeries.DataPoints
>
<
telerik:CategoricalDataPoint
Category
=
"1"
Value
=
"1.0"
/>
<
telerik:CategoricalDataPoint
Category
=
"2"
Value
=
"1.1"
/>
<
telerik:CategoricalDataPoint
Category
=
"3"
Value
=
"1.0"
/>
<
telerik:CategoricalDataPoint
Category
=
"4"
Value
=
"1.1"
/>
</
telerik:StepLineSeries.DataPoints
>
</
telerik:StepLineSeries
>
<
telerik:CartesianMarkedZoneAnnotation
VerticalFrom
=
"1.0"
VerticalTo
=
"1.1"
HorizontalFrom
=
"4"
Fill
=
"Red"
/>