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

Single bar chart per row

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Clint Singer
Top achievements
Rank 1
Clint Singer asked on 17 May 2010, 11:32 PM
Hi,

I was wondering if there is some way to place on each row a bar chart of a single value +/- from 0.  Please forgive me as I am not familiar with charting terminology.  A diagram might help with my intentions.

Row 1    -2      --|
Row 2     3         |---
Row 3   -4     ----|
Row 4    -1        -|
Row 5     5         |-----
etc.

I realize there isn't a lot to go on here but I hope my intentions are clear enough.

Cheers,
Clint

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 20 May 2010, 02:39 PM
Hi Clint Singer,

We are not sure that we understand your requirement, so we have two suggestions:

1. If you want a separate chart with only one item for every row:

  • Add a Chart item to a Detail section or a Table item. Set the DataSource of the Report /Table item. 
  • Set the Chart's DataSource property with Bindings to the appropriate parent item field.
  • Set the Chart's Title to Visible False
  • Set the SeriesOrientation to Horizontal
  • Set PlotArea -> YAxis -> AutoScale to False;
  • Set PlotArea -> YAxis -> MinValue/MaxValue to desired scale
  • Set PlotArea -> YAxis -> Step
Your chart definition:
this.chart1.Bindings.Add(new Telerik.Reporting.Binding("DataSource", "=Fields.Money"));
this.chart1.ChartTitle.Appearance.Visible = false;
this.chart1.ChartTitle.Visible = false;
this.chart1.SeriesOrientation = Telerik.Reporting.Charting.ChartSeriesOrientation.Horizontal;
this.chart1.PlotArea.YAxis.AutoScale = false;
this.chart1.PlotArea.YAxis.MaxValue = 100D;
this.chart1.PlotArea.YAxis.MinValue = -100D;
this.chart1.PlotArea.YAxis.Step = 1D;

2. If you want to use only one Chart item:
  • Set the Chart's datasource
  • Set the SeriesOrientation to Horizontal
  • Set PlotArea -> XAxis -> DataLabelColumn to the Field you want to be visible as a Column Label
Your chart definition:
this.chart1.DataSource = this.sqlDataSource2;
this.chart1.PlotArea.XAxis.AutoScale = True;
this.chart1.PlotArea.XAxis.DataLabelsColumn = "Money";
this.chart1.SeriesOrientation = Telerik.Reporting.Charting.ChartSeriesOrientation.Horizontal;

The expected results are shown in the following screenshot:


Hope this helps.

Kind regards,
Peter
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
Clint Singer
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or