How to plot different series

8 posts, 0 answers
  1. Travis
    Travis avatar
    49 posts
    Member since:
    Dec 2012

    Posted 14 May 2013 Link to this post

    Hello,

    We've got a chart that needs to display a couple different series types. All of values (thresholds, measurements) in a time domain.

    First is a series of thresholds. Probably the closest series type that will work for us is a BarSeries. These should go on the chart first and chart in the background (or possibly bring them to front, i.e. if corresponding conditions are being edited, type thing).

    Second is a series of measurements. We're currently doing this using LineSeries. The only thing I can say about this is, how are we able to treat X-axis values as values instead of categories? For instance, would be great to show the X-axis time domain as seconds (or divisions of milliseconds) and so on.

    Thank you.

    Regards,

    Michael Powell
  2. Travis
    Travis avatar
    49 posts
    Member since:
    Dec 2012

    Posted 15 May 2013 Link to this post

    Is this possible? Without drilling down at all: would be great if we can chart bar series and line series in the same chart. The axes would be the same, just we need a slightly different visual representation from the chart. Thank you...
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 17 May 2013 Link to this post

    Hello Michael,

    Thank you for writing.

    You can add two series to the same chart as long as they work with the same axes. Or you can have two series sharing a common axis and having their own secondary axis. The third option is to have two series without any common axes. For the first option just add the BarSeries and the LineSeries to the Series collection of RadChartView. For the latter you can see the following help article - Multiple axes support.

    I hope this will help. Do not hesitate to write back with further questions.

    Greetings,
    Ivan Petrov
    the Telerik team
    RadChart for WinForms is obsolete. Now what?
  5. Travis
    Travis avatar
    49 posts
    Member since:
    Dec 2012

    Posted 17 May 2013 Link to this post

    Okay, so I'd like to clarify, I can add several ScatterLineSeries, followed by several BarSeries?

    The data values (Y axis) display beautifully in the time domain (X axis) as one might expect.

    *EDIT* Actually, the type of series I would like to use is more like to display is more like a candlestick I think, except rotated 90 degrees from the online docs.

    Actually, now that I think about it, with control over painting characteristics, I believe we could very likely go with a clever reuse of another (limited) ScatterLineSeries, say of two points, marking begin/end in the time domain, and/or changes in data value thresholds. That could be our threshold series I think...

    *EDIT* Edit to the edit. The thought here is only preferred if somehow we can paint the threshold-series' to stand out apart from the data series'.
  6. Travis
    Travis avatar
    49 posts
    Member since:
    Dec 2012

    Posted 19 May 2013 Link to this post

    So... to recap, I have the ScatterLineSeries for purposes of non-categorical, numeric X and Y axes. Works great.

    Now I want to superimpose (or subimpose if you will) a thresholds series. Would like for that to be a BarSeries if possible. Also, the Candlestick series, except rotated 90 degrees would be ideal if we can manage it.

    Failing either of those, I would like to put another ScatterLineSeries in the chart. But if we do, I want to be able to control the colors, line weights, etc, of the thing being charted.

    Possible in the Telerik framework?

    Thank you...
  7. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 22 May 2013 Link to this post

    Hello Michael,

    Thank you for writing back.

    There is a mechanism allowing custom drawing in the chart area called custom rendering. You can insert your custom draw part to be drawn with the rest of the chart. To be able to adequately and accurately help you I would need to get a clean idea of what you are trying to achieve. Although your description is quite full "an image says a thousand words" as they say. Therefore I would kindly ask you to send me an image or a sketch of what you want to ultimately achieve so I can help you with precise advice and examples.

    Looking forward to your reply.

    Regards,
    Ivan Petrov
    Telerik
    RadChart for WinForms is obsolete. Now what?
  8. Travis
    Travis avatar
    49 posts
    Member since:
    Dec 2012

    Posted 27 May 2013 Link to this post

    Something like the attached. We start from some chart series with a ScatterLine type. Then we would like to represent thresholds supporting the charts.

    Both axes must be numeric for best possible representation in the X and Y domains. It's something like a Candlestick, except to have them rotated 90 degrees if you will (see images).

    Doesn't need to be that complex, or reinvent any wheels if possible. Another ScatterLine series would even work if we can control the palette and line weight, type thing.

    Thank you.
  9. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 30 May 2013 Link to this post

    Hello Michael,

    Thank you for your reply.

    Your suggestion is a good way to approach this scenario. You can add scatter line series for your threshold graphics. You can control the width of the scatter line through the BorderWidth property of the series, the color of the line through the BorderColor and the size of the data points that are plotted through the PointSize property. Here is an example:
    ScatterLineSeries series = new ScatterLineSeries();
    series.BorderWidth = 10;
    series.BorderColor = Color.Green;
    series.PointSize = SizeF.Empty;

    If you have a legend you can remove the threshold series through the IsVisibleInLegend property. Note that you have to use the property after you add the series to the chart Series collection:
    this.radChartView1.Series.Add(series);
     
    series.IsVisibleInLegend = false;

    I hope this will help. Should you have further questions, I would be glad to help.

    Regards,
    Ivan Petrov
    Telerik
    RadChart for WinForms is obsolete. Now what?
Back to Top
UI for WinForms is Visual Studio 2017 Ready