How to plot different series

15 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. 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?
  4. 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'.
  5. 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...
  6. 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?
  7. 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.
  8. 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?
  9. jamsheer
    jamsheer avatar
    36 posts
    Member since:
    Feb 2017

    Posted 08 Jul Link to this post

    Hello Telerik
            Here I have a chart view for showing the model of chart ,That means where I have dropdownlists with chart type names and Chart view for showing the selected chart type of Dropdownlist. Its works successfully.
    When I select Scatter Area Chart at first time then it showing successfully ,But Getting Error like that is "CartesianSeries can be attached to CartesianView" if I selected Scatter Area Chart Not at first Time.

         Where  I am using RadchartView.
           I attached the pic of Exception.
    How could I Overcome This exception.
    Thanks 
    Jamsheer

  10. jamsheer
    jamsheer avatar
    36 posts
    Member since:
    Feb 2017

    Posted 08 Jul in reply to jamsheer Link to this post

    Hello Telerik
            Here I have a chart view for showing the model of chart ,That means where I have dropdownlists with chart type names and Chart view for showing the selected chart type of Dropdownlist. Its works successfully.
    When I select Scatter Area Chart at first time then it showing successfully ,But Getting Error like that is "CartesianSeries can be attached to CartesianView" if I selected Scatter Area Chart Not at first Time.
           I attached the pic of Exception.
    How could I Overcome This exception.
    Thanks 
    Jamsheer
  11. Hristo
    Admin
    Hristo avatar
    949 posts

    Posted 10 Jul Link to this post

    Hello Jamsheer,

    Thank you for writing.

    The Polar and Cartesian area types are incompatible and you need to explicitly set the AreaType property of the chart whenever you are switching between polar and cartesian series. Please check my code snippet below: 
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
     
        private void radButton1_Click(object sender, EventArgs e)
        {
            this.radChartView1.Series.Clear();
            this.radChartView1.AreaType = ChartAreaType.Cartesian;
            ScatterAreaSeries scatterSeries = new ScatterAreaSeries();
            scatterSeries.DataPoints.Add(new ScatterDataPoint(15, 19));
            scatterSeries.DataPoints.Add(new ScatterDataPoint(18, 10));
            scatterSeries.DataPoints.Add(new ScatterDataPoint(13, 15));
            scatterSeries.DataPoints.Add(new ScatterDataPoint(10, 8));
            scatterSeries.DataPoints.Add(new ScatterDataPoint(5, 2));
            this.radChartView1.Series.Add(scatterSeries);
        }
     
        private void radButton2_Click(object sender, EventArgs e)
        {
            this.radChartView1.Series.Clear();
            this.radChartView1.AreaType = ChartAreaType.Polar;
            RadarPointSeries radarPointSeries = new RadarPointSeries();
            radarPointSeries.DataPoints.Add(new CategoricalDataPoint(3.8d, "Oranges"));
            radarPointSeries.DataPoints.Add(new CategoricalDataPoint(4d, "Bananas"));
            radarPointSeries.DataPoints.Add(new CategoricalDataPoint(1.5d, "Apples"));
            this.radChartView1.Series.Add(radarPointSeries);
        }
    }

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  12. jamsheer
    jamsheer avatar
    36 posts
    Member since:
    Feb 2017

    Posted 10 Jul in reply to jamsheer Link to this post

    Hello Hristo
            It works successfully .

          How can I adjust the size of chart view. 
    Thanks 
    Jamsheer

  13. Hristo
    Admin
    Hristo avatar
    949 posts

    Posted 10 Jul Link to this post

    Hello Jamsheer,

    I am glad that it is working well on your end. 

    Regarding your question, you can increase the control`s size. Please also note that we try to keep our threads related to a single topic. In case you have further questions not directly related to the initial one, you can open a ticket or create a forum thread. Thank you for understanding.

    I hope this helps.

    Regards,
    Hristo
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  14. jamsheer
    jamsheer avatar
    36 posts
    Member since:
    Feb 2017

    Posted 12 Jul Link to this post

    Hello Hristo
            Sorry ,

         I mean I want to change the size of an area of my Radchartview ,where the Radchartview size should be stable ,I mean I don't want to change the size of Radchartview ,change the area size only.

    Thanks 
    Jamsheer

  15. Hristo
    Admin
    Hristo avatar
    949 posts

    Posted 12 Jul Link to this post

    Hi Jamsheer,

    You can apply a margin on the chart element object. This way the size of the view holding the series will be changed: 
    this.RadChartView1.ChartElement.Margin = new Padding(25);

    I hope this helps. Please let me know if you have other questions.

    Regards,
    Hristo
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top