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

[Solved] Horizontal Bar is not aligned in the Center

2 Answers 182 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Fahad
Top achievements
Rank 1
Fahad asked on 23 Jun 2011, 03:02 PM
Hi, I customized the horizontal bar to just show flat colors, It also uses negative axis. Please check the below sample,

http://dl.dropbox.com/u/23500975/Telerik/NegativeChartSample.zip

If you look at the sample, the horizontal bars are not aligned in the center. And more over the Blue bars are below the horizontal bar lines.
I would like to have flat horizontal bars center aligned or stretched at least. Please let me know.

Thanks,
Fahad

2 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 28 Jun 2011, 08:46 AM
Hello Fahad,

Thank you for providing the sample application, we have been able to run and review it locally.

The blue bar series is misplaced because of one setting in the HorizontalItemStyle - removing VerticalAlignment="Center", which is set in the canvas should fix the problem with the misaligned blue bars.

As for the second issue - the two bar series are not centered because you have used mapping to XCategory, which leaves enough space for each series, thus the first one ( red ) being slightly above the center and the second one ( blue ) being slightly below it. There is a simple work-around to center both series, though, by setting the ItemOverlapPercent property to 100 :
...
                <telerik:RadChart.DefaultView>
                    <telerik:ChartDefaultView>
                        <telerik:ChartDefaultView.ChartArea>
                            <telerik:ChartArea ItemOverlapPercent="100" />
                        </telerik:ChartDefaultView.ChartArea>
                    </telerik:ChartDefaultView>
                </telerik:RadChart.DefaultView>
...

Hope this helps.

Regards,
Nikolay
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
Fahad
Top achievements
Rank 1
answered on 28 Jun 2011, 09:55 AM
Hey, Thanks anyway :), Someone might find it useful.

I had some more issues with zooming and scrolling enabled, this happens with the multiple series in place, so I simply removed that and made it a single series bar and used some converters directly in the templates. So that fixed all the issues that I had reported earlier,

-Fahad
Tags
Chart
Asked by
Fahad
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Fahad
Top achievements
Rank 1
Share this question
or