I've got a simple line series chart that plots a patient's lab results.
On this graph, I've also added a valueoverlay onto the graph to display a line of what an acceptable result threshold would be.
The user provides this threshold value and can change this threshold value while using the application.
Application and chart works in that if the user changes the threshold value, I've been able to update the graph, after help from Andrew, to reflect this change.
What I'm tackling now is how to handle if the user removes the threshold value all together. In this case, I want to...ultimately...simply remove the existing valueoverlay and show the chart without. Flip side of the coin, if the user chooses later to add a threshold value back, I want to update the chart and once again show the valueoverlay.
I'm hoping for some guidelines on how I would go about this. I'm not sure if I need to completely reset the chart using a series of methods to clear all previous chart initializations out, or, find the overlay within the chart and somehow delete, etc. It would be great to simply set the valueoverlay value to null and in doing so it would hide, etc. I'm not sure if it complicates matters, but I'm trapping the event AssigningCategoryMarkerStyle so that I can paint the charts data points a specific color based on the user's provided threshold.
Appreciate any guidance/help as usual.
Hello Randy,
I have been investigating into the behavior you are looking to achieve, and if the end user is looking to remove the threshold altogether, I would recommend that you either remove the ValueOverlay object from the Series collection of the chart or change the Visibility of the ValueOverlay that you have set. From your description, it seems like this element could be toggled on or off at will in your case, and so I would probably recommend modification of the Visibility.
Please let me know if you have any other questions or concerns on this matter.
You sir...are a scholar and a gentleman.
Once again, you saved my day!
Randy