kazuhiro Posted August 17, 2007 Report Share Posted August 17, 2007 Hi, I have a problem drawing bar chart. See the following image: The last points are drawn out of the border. Can anyone give me a clue what causes this and how to solve it? Thanks, Kazuhiro Quote Link to comment Share on other sites More sharing options...
Frank Posted August 18, 2007 Report Share Posted August 18, 2007 It seems that galleries are being combined in an incompatible way. Add this line to your initialization code: chart.AllSeries.Gallery = Gallery.Bar; Quote Link to comment Share on other sites More sharing options...
kazuhiro Posted August 19, 2007 Author Report Share Posted August 19, 2007 Frank, Thank you for replying. I tried your suggestion and it seemed to fix the problem. However, once I set "AllSeries.Gallery = Gallery.Bar", it then ignores AxisX.Max and AxisX.Min. I thought AllSeries property was just a default value and each series' properties overrode it. Would you please give me further explanation? Thanks,Kazuhiro Quote Link to comment Share on other sites More sharing options...
Frank Posted August 20, 2007 Report Share Posted August 20, 2007 A bar chart doesn't have a real X-Axis, you can not set the Min and Max, the X-Axis is categorical. That's is actually the reason why you were getting the bars out of range. What exactly are you trying to do by setting the Min and Max? If it is the scrolling you want to control you can use SetScrollView (Axis class). Quote Link to comment Share on other sites More sharing options...
kazuhiro Posted August 21, 2007 Author Report Share Posted August 21, 2007 What I'm trying to do here is to set "view points", i.e. the data source contains data for several months and I want to show data for a certain period, say 30 days. It's kind of scrolling but SetScrollView would not be a solution since I have several charts whose "view points" have to be synchronized so I can't use scroll bars. I think I can do it by dropping invisible data before binding to a chart but... Do you have any idea rather than that? Kazuhiro Quote Link to comment Share on other sites More sharing options...
Frank Posted August 22, 2007 Report Share Posted August 22, 2007 You only have two options: 1) You pass only the data you want to plot. 2) You use SetScrollView In a categorical X-Axis, you can not clip values outside of the chart's X-Axis. The X-Axis spans the full length of the data. Quote Link to comment Share on other sites More sharing options...
kazuhiro Posted August 24, 2007 Author Report Share Posted August 24, 2007 Finally I made it by implementing option #1. Thanks a lot for your support. Kazuhiro Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.