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

Add floating label to RadChart / plotting floating point data

3 Answers 197 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
fudoki22
Top achievements
Rank 1
fudoki22 asked on 12 Feb 2010, 03:51 PM
Two questions, one hopefully very simple so will start with that.

My dataset contains values like (14.8206902137731, 15.4773593366931, 14.6153823359167,13.9488355186086 etc). When I view them on my bar chart the first three values are rounded to 15 and the 4th to 14 and thus look identical. How do I show at least some difference between them (rounding to 2 decimal points is sufficient)?

Second question - based on user input, I need to dynamically add a horizontal line on across the graph (y-axis), reading something like "your value". I'm thinking I'd do this by creating a marked zone, set ValueStartY and ValueEndY to the user input value (once calculated).
Seems to work but not quite sure where the label is (or isn't) and I'm concerned that the label is displayed inside the marked zone but as I need to have the zone set so it displays as a line, then I can't see the label?
I have Label TextBlock-Visible = true and have tried various settings for TextBlock-Position to no avail - no text appears. I just want a label to appear to the right of the Marked Zone. 

thanks in advance
--M

3 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 17 Feb 2010, 09:49 AM
Hello Michael,

Let me start with the marked zones labels -- I am afraid they can only appear inside the marked zones, so indeed -- when marked zone is used to draw a line you would not be able to show the label.

As for the bar values being hidden -- can you please provide more details? I have attached a small page showing the default behavior - the bars appear with different heights. I have added a setting for the bar labels - DefaultLabelValue="#Y{F4}" meaning - display the YValue as a floating point with 4 decimals.

Sincerely,
Ves
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
fudoki22
Top achievements
Rank 1
answered on 18 Feb 2010, 11:42 AM
Hi Ves,

Thanks for the update. The heights of the bars were fine once I added DefaultLabelValue setting so not sure what was going on there.

I've abandoned the idea of using a marked zone and am programatically adding a 2nd chart series in line format.

One question I haven't been able to resolve so far is, if I have a chart with a bar and line series, is there any way to get both the leftmost bar and the line flush to the left edge of the graph?  

If I set radChart.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Normal; then the line is flush to the left edge but the left-most (and right-most) bars are only have displayed. 

If I set radChart.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Between; then the bars are displayed ok but the line starts and ends in the middle of the left and right most bars.

Is it possible to set a layout mode on the xaxis for 2 separate chartseries?

thanks
--Mike
0
Accepted
Ves
Telerik team
answered on 19 Feb 2010, 08:17 AM
Hello Michael,

I am afraid you cannot have different layout modes for different series -- the LayoutMode property defines how ticks and values are placed along the X axis. The series are then aligned accordingly.

You can still achieve the desired result by letting the line series overflow the chart borders -- set the XAxis.MinValue, XAxis.MaxValue and XAxis.Step, set all the ChartSeriesItems' XValue property so that the bars are inside the X axis range and the line's ends are outside it.

Greetings,
Ves
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
Chart (Obsolete)
Asked by
fudoki22
Top achievements
Rank 1
Answers by
Ves
Telerik team
fudoki22
Top achievements
Rank 1
Share this question
or