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 a few questions regarding Charting Data Series. I have combined them in a single thread.
If you could answer the above it would much appreciated. Dennis Roche |
|
|
Hello Dennis 1. Yes the ToolTip property is not used by the DataSeries class. The DataSeries.ToolTip property is inherited because DataSeries extends the Control class. The easiest way to put a tool tip on a data series is to create a custom style for part of a data series. For example, say you want to have a tool tip on the line of a LineSeries. You can create a Path style and set it's ToolTip property using a setter. Then set the LineSeries.LineStyle property to be that PathStyle. 2. Unfortunatly we only support data point selection at the moment. Clicking on a line to select the whole series is planned for the future though. I have attached a sample that demonstrates a very simple way that you can implement it yourself for now. It involves creating a custom line style and using an EventSetter to attach an event handler to the MouseDown event. In the code behind we keep a boolean field to state whether the line is currently selected. In the event handler we toggle the boolean field and then change the thickness of the line based on if it is selected or not. I have also put a tool tip on the line. To run the sample, make sure to include a reference to your copy of the Mindscape.WpfElements.dll. 3. You can find useful samples for styling different parts of a chart in the ChartingGallery and ChartingSampleExplorer projects. The ChartingGallery has lots of examples for styling the different types of data series. The CustomBarPage has different examples for styling a bar series. The ChartingSampleExplorer has a page called CustomChartStyle which demonstrates how to customize the legend, title and chart axes. Let us know how it goes |
|
|
Thanks Jason. I will try your suggestions today and let you know how it goes. |
|
|
Hi Jason, I was able to implement the above using your attached example as a guide. To make it work with my application where I need to dynamically generate the chart I had to make significant changes to the library. Summary
Other changes to Chart
With your knowledge of the original design of the controls, is there any possible errors or pitfalls that my changes would introduce/cause? |
|
|
Hi Dennis, They're some great enhancements that you're looking at making and we think most of them would be great to add to the product itself. It's important to note that if you modifying the source and use it in production that we cannot provide support for your purchase as it would be too time consuming to investigate custom source code. Due to that our preference is normally to take feedback like this and look at incorporating it into our own nightly builds which provides the best outcome for everyone:
With that in mind, Jason is going to look into supporting most of the features you're looking at here (he has a bunch of questions first which I will leave him to ask!). Even if after working with you we do not elect to make all changes, it will still make your life easier if you're not having to make significant changes. Hopefully we can work together to get you what you need. Kind regards, John-Daniel Trask |
|
|
Hello Dennis As John-Daniel mentioned, we can implement some of these features for you such as alternate X axes and full-series selection mode. This would mean that if you needed further support from us, it would be easier for us to add more feature requests and such. 1. Could you please explain what senarios you need the SymbolStyle property to be in DataSeries. 2. One thing to be aware of here is that series such as AreaSeries uses both AreaStyle and LineStyle properties. So these should not be combined into a single SeriesStyle property. 4. We can implement the full-series selection mode for you. 5. For setting the tooltips on the line, we could include support for the built in tooltip property which would allow you to still set up bindings. For creating a slected state for lines etc, we could provide a SelectedLineStyle property where you can set the style you want for the line to be selected which would then be applied to the line when the series is selected. -- 1. A single Chart control can have multiple series, and each series has it's own items source. Are you wanting an ItemsSource property on the Chart control? 2. What does your YAxes collection do? does it contain alternate Y axes as well as the standard Y axis? or is it simply the same functionality as the AlternateYAxes collection? If you do end up needing alternate X axes, then we could add this for you. Let us know what you think. |
|
|
Hi Jason, Apologies for the slow reply. First up, as have been continuing work on my application I have rolled back some of the changes that I've made. Now to answer your questions. public DataSeries CreateChartingSeries(ChartSeriesType type, Color color, string name) By having it on the base class I can simply set SymbolStyle and then let implementation of the series (i.e. LineSeries, AreaSeries) decide whether it wants to use it. |
|
|
Gah. The formatting of that last post is awry. Is there an edit button so I can fix it? |
|
|
Hello Dennis Thanks for these answers. 1 & 2. I can see how these changes make it easier to use in a factory. We don't plan to make these changes at our end though. 3. We will let you know when this becomes available. 4. I'll put this into consideration. - Jason |
|
|
Hello Dennis The whole-series selection feature will be available for download through the nightly builds from tomorrow the 23rd of September. All data series will now have an IsSelected property. This is currently supported by: LineSeries, AreaSeries, SplineSeries, SplineAreaSeries, StackedLineSeries, StackedAreaSeries, StackedSplineSeries and StackedSplineAreaSeries. Clicking on a line or area will toggle the IsSelected property. In the style, you can use a DataTrigger with Binding="{Binding IsSelected}" to change the visual of the selection state. Let us know if there is any more functionality you require here. |
|
|
Thanks Jason. I do have a further questions, however I will create a new thread. |
|