This is a migrated thread and some comments may be shown as answers.

CartesianPlotBandAnnotation and CategoricalAxis fill problem

6 Answers 222 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
LOUGE
Top achievements
Rank 1
LOUGE asked on 18 Jul 2013, 09:15 AM
Hi,
By defaut CartesianPlotBandAnnotation draw the annotation from -> to plot value

I have a RadCartesianChart using a BarSeries and CategoricalAxis as HorizontalAxis. The categories represent hours (in 24 hours format) : 0 1 2 3 ... 23

If settings CartesianPlotBandAnnotation with parameters From : 6 and To : 23 the annotation starts at the middle of the 6 hour bar et 23 hour bar.

I'm searching a solution to force CartesianPlotBandAnnotation to fill 6 and 23 hours bar drawing zone.

Thanks a lot ! :)

6 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 22 Jul 2013, 08:28 AM
Hello,

You are absolutely correct - the plot band annotation will start from exactly where a data point would be drawn. This is why the plot band starts at the middle of the 6th hour.

However, I agree that this leads to unclear visual representation and I have logged this as a feature request in our PITS where you can vote for it and track its status. I have also updated your Telerik points as a sign of gratitude for bringing this to our attention.

Unfortunately at this moment there is no work-around that I can suggest in order to achieve the desired output.  Let us know if we can assist you with anything else.

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
LOUGE
Top achievements
Rank 1
answered on 22 Jul 2013, 08:48 AM
Voted !
Thanks for your answer.
0
Senthil kumar
Top achievements
Rank 1
answered on 18 Nov 2013, 04:25 PM
Hi,
By defaut CartesianPlotBandAnnotation draw the annotation from -> to plot value

I have a RadCartesianChart using a line axis and CategoricalAxis as HorizontalAxis. i want to represent the category axis whole integer format : 0 2 4 6 8.....

my code is 
 CategoricalAxis categoricalAxis = new CategoricalAxis();
                            categoricalAxis.LabelFitMode = AxisLabelFitMode.MultiLine;
                            categoricalAxis.MajorTickInterval = 4;
                            categoricalAxis.MajorTickOffset =1; 
                            categoricalAxis.LabelInterval =4;
                            categoricalAxis.LabelOffset = 0;
                            categoricalAxis.LabelFormat = "#0";
                            categoricalAxis.LastLabelVisibility = AxisLastLabelVisibility.Visible;
                            chart.HorizontalAxis = categoricalAxis;

but, the chart is not produce the result as expected. it produce the result with decimal format (as it is plot value) image attached.


could you please suggest the solution.
0
Petar Marchev
Telerik team
answered on 20 Nov 2013, 07:08 AM
Hi Senthil,

Is there a reason for you not to use a LinearAxis for the HorizontalAxis? You can use a ScatterLineSeries instead of the LineSeries and the labels of the axis will be calculated automatically and will be whole integer numbers. See how it goes and let us know if you need further help.

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Senthil kumar
Top achievements
Rank 1
answered on 20 Nov 2013, 02:46 PM
Hi Petar,
first i explain my situation..

I'm working in a chart to display dateTime value (x axis dateTimecontinousAxis) vs. voltage (y axis - linear axis) in  Line Series, and relative time (integer value) (x axis-categorical Axis) vs.% (y axis) in line Series, Obviusly the 2 axes must share the same series. (x-axis will be changed when radio button (absolute time, relative time) changed.

both x-axis is working correctly. but, x-axis shows defaut CartesianPlotBandAnnotation draw the annotation from -> to plot value. (for example relative time interger value... 1.343, 2.343 as it is the plot value). i cannot format the value like whole integer (0, 2, 4).


so, i have changed to scatterline series instead of line series and categorical axis as x-axis instead of linear axis. (as per your suggestion)

 now the datetimecontinous axis is not support the scatterlineseries. (linearaxis  supports the scatter series).


NOTE. i'm generating the chart in run time

thanks in advance
0
Petar Marchev
Telerik team
answered on 25 Nov 2013, 11:00 AM
Hello Senthil,

I am still slightly confused. First I want to explain that you can either work with CategoricalSeries (which use CategoryBinding) or work with ScatterSeries (which use XValue and YValue bindings). The categorical series require one numerical and one categorical (CategoricalAxis, DateTimeAxis) axis. The scatter series require two numerical axes (Linear or Logarithmic).

From what I understand - you need two different charts that are set up in a different way. One chart has a DateTime axis, a linear axis and a line series. The other chart has two linear axes and a scatter line series (and a different items source). Am I correct to assume the items source is different?

Now, you need to toggle the visibility of the two charts. Is this what you are trying to achieve? 

I did not understand what is the reason not to use a linear axis for the horizontal axis.

The label format is not taken into consideration at all when using a CategoricalAxis. It is a property that the class inherits and is not used anywhere in the code of the CategoricalAxis. If you need to set a label format you can use a label template and apply the formatting there.

Regards,
Petar Marchev
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ChartView
Asked by
LOUGE
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
LOUGE
Top achievements
Rank 1
Senthil kumar
Top achievements
Rank 1
Share this question
or