Thanks to Andrew Goldenbaum's recent help to a few of my previous questions, I'm off and running with a few new charts.
I created a new post/question as although related to ultradatachart creation/etc., it was slightly different that my previous set of questions...my apologies if I should have continue on with my previous thread.
I have a set of graphs that look similar to the image below, where the plotted points on the yAxis are compared to a particular threshold value (within the assigningCategoryMarkerStyle event) and in doing so, colored red for above threshold, green for being in range, etc. They have their datasource set in such a way that when the underlying data changes (patient lab results), the graphs respond as I expect.
However, these graphs are part of an application that allows the user to re-define the governing threshold values on the fly, which are not part of the actual data being supplied to the graphs...other than the overlay value being set to the user's threshold value. When these thresholds are changed, I'd like to be able to refresh the graphs so that they redraw/repaint, etc., and therefore the yAxis plotted markers adjust their colors if needed. Example, if the user raises the max threshold to 20, I want to reflect this by refreshing the graph so that the points colored red (below) are no longer red but green after the change.
I've tried using ultradatachart.refresh() as well as update, but no joy. I realize this might be done by faking a data change of some sort, but I'd rather not do this.
Appreciate the help.
Hello Randy,
I am under the impression that you are essentially looking to have the assigningCategoryMarkerStyle event for your series fire again so that you can re-evaluate the colors of the markers. If this is the case, you can do this by invoking the NotifyVisualPropertiesChanged method on your series. For example, if you had a single LineSeries in your chart, you could use the following code to invoke this:
LineSeries series = ultraDataChart1.Series[0] as LineSeries; series.NotifyVisualPropertiesChanged();
Please let me know if you have any other questions or concerns on this matter.
You are correct Andrew, and thanks for replying.
If the user changes a threshold value, such as from 13 to 10, I need to
I see within your online documentation that the Infragistics.Win.DataVisualization.LineSeries class offers this Notify...event, but I cannot get my dev tool to "see" this event nor will the compiler recognize it as a valid method for that class. Could it be my current version, which I believe to be 19, does not have this? If so, can you suggest a workaround?
Randy
Regarding the change of the ValueOverlay, you can simply get the ValueOverlay object from the Series collection of the UltraDataChart and set its Value property when your user changes the Threshold.
I have checked our API against version 19.1 and 19.2 and it doesn’t appear that the NotifyVisualPropertiesChanged method existed then. I would instead recommend that you use the RenderSeries method on the series instead. This method does take a parameter that designates whether or not you want the series to animate. If you don’t, you can essentially call series.RenderSeries(false). This should re-fire the assigningCategoryMarkerStyle event.
Once again, you are the man Andrew.
My apologies for delay in my response. A sincere thank you for your information. This worked like a charm.