CartesianPlotBandAnnotation and CategoricalAxis fill problem

7 posts, 0 answers
  1. LOUGE
    LOUGE avatar
    12 posts
    Member since:
    Jun 2010

    Posted 18 Jul 2013 Link to this post

    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 ! :)
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 22 Jul 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. LOUGE
    LOUGE avatar
    12 posts
    Member since:
    Jun 2010

    Posted 22 Jul 2013 Link to this post

    Voted !
    Thanks for your answer.
  5. Senthil kumar
    Senthil kumar avatar
    21 posts
    Member since:
    Sep 2013

    Posted 18 Nov 2013 Link to this post

    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.
  6. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 20 Nov 2013 Link to this post

    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 >>
  7. Senthil kumar
    Senthil kumar avatar
    21 posts
    Member since:
    Sep 2013

    Posted 20 Nov 2013 Link to this post

    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
  8. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 25 Nov 2013 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready