This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have the following data bound to a Chart with 2 StackBarSeries:
FinishedStatistic = new List<KeyValuePair<string, int>> { new KeyValuePair<string, int>("5/2", 2), };
UnfinishedStatistic = new List<KeyValuePair<string, int>> { new KeyValuePair<string, int>("5/2", 4), }; And the chart showed nothing. I tried to add one more pair like:
FinishedStatistic = new List<KeyValuePair<string, int>> { new KeyValuePair<string, int>("5/1", 2), new KeyValuePair<string, int>("5/2", 2), };
UnfinishedStatistic = new List<KeyValuePair<string, int>> { new KeyValuePair<string, int>("5/1", 3), new KeyValuePair<string, int>("5/2", 4), }; And this time it showed two stacked bar chart, but they were placed at two side of chart with abnormal X-Axis titles shown like: 5/1 5/1 5/1 5/1 5/1 5/1 5/1 5/1 5/1 5/1 5/1 up to 11 titles!! How come? Then I tried adding one more:
FinishedStatistic = new List<KeyValuePair<string, int>> { new KeyValuePair<string, int>("4/30", 3), new KeyValuePair<string, int>("5/1", 2), new KeyValuePair<string, int>("5/2", 2), };
UnfinishedStatistic = new List<KeyValuePair<string, int>> { new KeyValuePair<string, int>("4/30", 1), new KeyValuePair<string, int>("5/1", 3), new KeyValuePair<string, int>("5/2", 4), }; The X-Axis titles were still displayed abnormal: 4/30 4/30 5/1 5/1 5/2 Then I tried adding one more, 4th, and this time thing went normal as expected.
Here's the chart xaml:
<Mindscape_PhoneElements_Charting:Chart> <Mindscape_PhoneElements_Charting:StackedBarSeries ItemsSource="{Binding FinishedStatistic}" XBinding="{Binding Key}" YBinding="{Binding Value}" SeriesBrush="#FFDB843D"/> <Mindscape_PhoneElements_Charting:StackedBarSeries ItemsSource="{Binding UnfinishedStatistic}" XBinding="{Binding Key}" YBinding="{Binding Value}" SeriesBrush="#FFF9B590"/> </Mindscape_PhoneElements_Charting:Chart>
Now question: is it a bug? Or did I miss some settings? |
|
|
Hello Yeah, lets call this a bug. Though it has already partially been fixed. If you download the latest nightly build you will find that most of the senarios you described should display as you'd expect them to. If there are still issues with the axis labeling, then you can set the XAxis MajorTickMarkSpacing to be 1. For displaying a single data point, this will not be fixed through the current nightly builds. Instead, I have fixed this now and an update will be available through the nightly builds from tomorrow the 4th of May. The nightly builds for the trial version can be downloaded from here: http://www.mindscapehq.com/products/phone-elements/nightly-builds or go to your account page if you are a customer: http://www.mindscapehq.com/store/myaccount Thanks for the feedback, let me know how it goes. - Jason |
|
|
Hi Jason, For two and three data points, it works fine with the 5/6/2011 nightly build. But for a single data point, the chart still showed nothing. What I did was uninstall the old version and install the new one, and I commented out the entries in my data list to a single entry, with all other things unchanged. Thanks/Allen |
|
|
Jason, I was just displaying some statistics up to 5 data points in my app, and ran into this issue by chance. Just let you know why I have this issue. Thanks/Allen |
|
|
Hello Thanks for the feedback. I didn't notice this at first because setting the MajorTickSpacing property to 1 resolves the issue. I have now updated the chart control to support this scenario automatically. Regards |
|