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

Telerik Reporting Chart click event in-code.

3 Answers 241 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Grzegorz
Top achievements
Rank 1
Grzegorz asked on 30 Jun 2011, 10:16 AM
Hi,

im starting to use Telerik Reporting Chart, but i cannot find the onclick event on any of chart items. In documentation of Ajax Chart i've found:  "Use the RadChart OnClick event to handle server postbacks caused by clicking on areas of the chart.".  I would like to get any click event made on different chart bars to redirect to a page with details info and everything has to be done in-code.

Below you see my test code for chart configuration:

 

 Report report = new Report();

 DetailSection detail = new DetailSection();

 Telerik.Reporting.Chart progchart = new Telerik.Reporting.Chart();

 progchart.BitmapResolution = 96F;

progchart.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;

 progchart.Location =
new Telerik.Reporting.Drawing.PointU
(new Telerik.Reporting.Drawing.Unit(0.3, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))),
new Telerik.Reporting.Drawing.Unit(1.8, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))));

 progchart.Name = "progchart1";

 progchart.PlotArea.EmptySeriesMessage.Appearance.Visible = true;

 progchart.PlotArea.EmptySeriesMessage.Visible = true;

 progchart.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(9.6, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))), new Telerik.Reporting.Drawing.Unit(6.1, ((Telerik.Reporting.Drawing.UnitType)(Telerik.Reporting.Drawing.UnitType.Cm))));

 // Create a ChartSeries and assign its name and chart type

 ChartSeries chartSeries = new ChartSeries();

 chartSeries.Name = "Sales";

 chartSeries.Type = ChartSeriesType.Bar;

 // add new items to the series,

 // passing a value and a label string

 chartSeries.AddItem(120, "Internet");

 chartSeries.AddItem(140, "Retail");

 chartSeries.AddItem(35, "Wholesale");

 progchart.Series.Add(chartSeries);

 // add the Chart to the page.

 detail.Items.AddRange(new Telerik.Reporting.ReportItemBase[] { progchart });

 report.Items.Add(detail);

 BR,
Grzegorz Smoliński

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 01 Jul 2011, 12:56 PM
Hi Grzegorz,

The Chart report item uses the same engine as RadChart for ASP.NET AJAX, however there are some differences and limitations however both from chart and report point of view:

  • interactive features such as tooltips, maps, active regions and events inherent to the RadChart control are not supported. This information is present in the Known limitations of Telerik Reporting along with other limitations.

Although it shares the same API as the chart web control, our suggestion is to look at the chart documentation in the report help as it is updated according to the supported features. You can also see the chart in action in two of our demo reports:

Regards,
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
0
Grzegorz
Top achievements
Rank 1
answered on 04 Jul 2011, 09:10 AM
Hi,

thank You for the reply. However it didn't answer to my question in 100%. I've found that I can add actions like UrlAction to UI elements placed in reports(TextBoxes etc.). My question was different. I would like to add actions to chart bars ON the graph. I'm curious if that is supported.  I've attached a screenshot with sample graph and an area where the UrlAction event has to be added. 

BR,

Grzegorz Smoliński
0
Accepted
Steve
Telerik team
answered on 04 Jul 2011, 09:19 AM
Hello Grzegorz,

Sorry, I thought that my previous post made clear of this as well. As noted in the Actions help article, you define an Action on a report item i.e. it applies for the whole report item. What you ask for is "action regions" in the chart itself which is not supported.

Regards,
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
Grzegorz
Top achievements
Rank 1
Answers by
Steve
Telerik team
Grzegorz
Top achievements
Rank 1
Share this question
or