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

Problem is displaying data in StackedSpline chart

1 Answer 39 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
manoj
Top achievements
Rank 1
manoj asked on 12 Aug 2010, 12:47 PM
Hi,
I have created a report with StackedSpline chart. The report should display the chart for each device with its parameter values(Y-Axis) vs DateTime(X-Axis). Following the code snippet of the report.

namespace Reports
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;
    using Telerik.Reporting;
    using Telerik.Reporting.Drawing;
 
    /// <summary>
    /// Summary description for Report2.
    /// </summary>
    public partial class Report2 : Telerik.Reporting.Report
    {
        public Report2()
        {
            /// <summary>
            /// Required for telerik Reporting designer support
            /// </summary>
            InitializeComponent();
 
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            this.reportTableAdapter1.Fill(this.temp1.report);
        }
 
        private void chart1_NeedDataSource(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender;
            procChart.DataSource = this.temp1;
 
            chart1.Series[0].DataYColumn = "ParamValue";
            chart1.PlotArea.XAxis.DataLabelsColumn = "timeDate";
            chart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 300;
            chart1.PlotArea.Appearance.Dimensions.Margins.Bottom = Telerik.Reporting.Charting.Styles.Unit.Percentage(30);
            chart1.PlotArea.Appearance.Dimensions.Margins.Right = Telerik.Reporting.Charting.Styles.Unit.Percentage(30);
        }
 
        
    }
}

The chart is plotting the values in one line for all the parameters. But I want to display the parameter values in different line for each parameter name.

My database table looks like this,

DateTimeStamp Parameter_Name ParamValue DeviceID
7:03:58 PM PM_PH_A_ABC 125 129
7:03:59 PM PM_PH_A_ABC 125 129
7:04:00 PM PM_PH_A_ABC 25 129
7:04:01 PM PM_PH_A_ABC 125 129
7:03:58 PM PM_XYZ 125 129
7:03:59 PM PM_XYZ 125 129
7:04:00 PM PM_XYZ 5 129
7:04:01 PM PM_XYZ 50 129
7:03:58 PM PM_PH_A_ABC 100 133
7:03:59 PM PM_PH_A_ABC 25 133
7:04:00 PM PM_PH_A_ABC 8 133
7:03:58 PM PM_XYZ 125 133
7:03:59 PM PM_XYZ 15 133
7:04:00 PM PM_XYZ 7 133

From the above table I need to show two lines(PM_PH_A_ABC, PM_XYZ) in the graph.

In my report I am getting one line for the two parameters. Please refer the attached output of my report

Can anyone please help me how to plot lines for each parameters(the parameters are dynamic) in the StackedSpline chart.

Thanks in advance.

Regards,
Manoj

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 13 Aug 2010, 01:23 PM
Hi Manoj,

Currently it is not possible to achieve what you're after in the chart item, due to missing functionality. A possible solution would be to generate the chart using our RadChart for ASP.NET AJAX control and show the image in the report through the PictureBox item. You can see sample implementation in the following code library: Use asp:chart in Telerik Reports.
Basically what you need to do is set the ValuesYColumns to the desired parameter e.g.:

RadChart1.DataManager.ValuesYColumns = new string[] {"Parameter_Name"};

All the best,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
manoj
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or