
Hi, thank you for your quick response.
Using Range to simulate a "constant line" is a workaround that could work but consider to support a specific way of doing it. Something that needs only a value (for range you need to set two values, max and min, and do an adjustment for a thin line!)
I found two issues on using Range (I have a sample project that demonstrate these issues, how can I send it to you?):
- As I'm using two axis for Y, it seems that all Ranges are "attached" to Y2 (humidity).
Snippet for related code:
<charts:XYChart.YAxes>
<charts:XYDoubleAxis x:Name="yAxis1" Title="Temperature" AreMajorTicksVisible="True" TickMajorInterval="5" Position="NearEdge">
<charts:XYDoubleAxis.Ranges>
<charts:XYRange Maximum="11.1" Minimum="10.9" Background="Red"/>
<charts:XYRange Maximum="-5.1" Minimum="-4.9" Background="Blue"/>
</charts:XYDoubleAxis.Ranges>
</charts:XYDoubleAxis>
<charts:XYDoubleAxis x:Name="yAxis2" Title="Humididty" AreMajorTicksVisible="True" TickMajorInterval="5" Position="FarEdge">
<charts:XYDoubleAxis.Ranges>
<charts:XYRange Maximum="60.1" Minimum="59.9" Background="Green"/>
<charts:XYRange Maximum="45.1" Minimum="44.9" Background="Yellow"/>
</charts:XYDoubleAxis.Ranges>
</charts:XYDoubleAxis>
</charts:XYChart.YAxes>
- It seems that Range do not support negative values!
this range doesn't appear at all:
<charts:XYRange Maximum="-5.1" Minimum="-4.9" Background="Blue"/>
Thanks