Note from the attachment we have drawn a blue and black line (2 line series). We then add a RangeAreaSeries to color the area between the lines gray. The upper series of the range is constructed from the greater values of the two line series and the lower series from the lesser values.
We are having two problems:
1. As you can see, the gray area is not always precisely contained within the lines near where the lines cross each other. This is due to switching from one series to the next and the space between points. It's not likely this can be fixed unless there is a different way to color between lines.
2. We would like to color the range in two different colors: one color when the blue line is above the black line and a different color when the blue line is below the black line. RangeAreaSeries does not support this. It can be done with one line above and below zero, using a positive and negative brush, but we haven't figured out a way to do it with two lines.
Any suggestions?
Jim
Jim, The crossing is happening there because you don't actually have a data point at the crosspoint, so the line series are interpolating in either direction and the interpolations cross. But to the range series it will always just take the maximum of the high and low value to be the high value, so it doesn't appear to the range area series that the range has closed to 0 unless that data point where there high and low are equal is actually present. Nevertheless, I think there might be a way you can achieve the display you want, let me see what I can do.
First though, Jim, are you using the CategoryXAxis or CategoryDateTimeXAxis?
Hi Graham,
We are using the CategoryXAxis. I understand and agree with your interpretation. Any advice would be appreciated. Also, for item 2 (different colors).
Thanks,
Jim,
If this were date time x axis I would just suggest emitting the crossing points also. But if you did that for CategoryXAxis it would extend the length of the series, which may not be desired. I would suggest approaching this as a custom series, except it looks like too much of the range category series stuff is internal, so the custom series would require too much code to be palatable.
For the multiple colors, I was going to suggest using two series and to emit double.NaN values and use DontPlot to just color the positive or negative ranges. But it doesn't seem as if the range series support the the DontPlot option.
Given the above your best option is probably to make a feature request for this kind of crossing and positive/negative behavior from the range series.
BTW, what are your data requirements in terms of volume for this series? If they are low, you could probably do a custom series that does this rendering without too much code. If your volume requirements are high, however, too much of the series logic that helps with data volume is currently internal so it would be tricky to author a custom series without either releasing an update that published more of the series internals (which we could do, given a feature request for eaiser extension of this series type), or writing a lot of code from scratch for a custom series.
-Graham
Hi,
You're very welcome. In fact we're glad to have suggestions so that we can keep improving the products.
Thanks Marianne for submitting the requests. We look forward to improving this solution when the new features are available.
I believe that Graham suggested creating a custom series in this case might require an excessive amount of code because "too much of the range category series stuff is internal".
So I have created a new product idea requesting the addition of the UnknownValuePlotting property and DontPlot to the range series. As Graham suggested this would modify the crossing and positive/negative behavior to accomdate your design needs. This idea and the details you and Graham were discussing has been submitted directly to our Product Management team.
Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your features are chosen for development you will be notified at that time. Your reference number is PI12070151. Please let me know if you have any questions.
There is still the issue of not coloring between the lines, as you can notice on the most recent image.
While this solution will mostly work, a more robust solution would perfectly color between the lines. We haven't worked with the new Custom Series yet, but wondered if that might work here. Otherwise, it may have to be a feature request.
Hi Jim,
It looks like you and Graham have resolved your questions but I was wondering if you had any follow-up quesitons that I could help you with.