Constant line on XYChart

Posted 4 years ago by Avatar Sérgio Neves

Hi, I'm evaluating your Chart for WinRT.

I'm trying to achieve a temperature and humidity chart, with a DateTime axisX. So far I manage to have two series (temp. and hum.) in a X, Y1 and Y2 chart.

Two questions for now:

- How to show 2 constant lines to represent high and low thresholds for each serie?

- How to zoom in/out chart, in both axis XY?


Comments (3)

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Sérgio,

Thanks for evaluating our Charts.  You could use the Ranges feature (see related QuickStart for an example) with a very thin range to render a line.

As for zooming, we don't support that feature at this time but I will log your request for it.

Actipro Software Support
Posted 4 years ago by Sérgio Neves

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:XYDoubleAxis x:Name="yAxis1" Title="Temperature" AreMajorTicksVisible="True" TickMajorInterval="5" Position="NearEdge">


<charts:XYRange Maximum="11.1" Minimum="10.9" Background="Red"/>

<charts:XYRange Maximum="-5.1" Minimum="-4.9" Background="Blue"/>



<charts:XYDoubleAxis x:Name="yAxis2" Title="Humididty" AreMajorTicksVisible="True" TickMajorInterval="5" Position="FarEdge">


<charts:XYRange Maximum="60.1" Minimum="59.9" Background="Green"/>

<charts:XYRange Maximum="45.1" Minimum="44.9" Background="Yellow"/>





- 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"/>



Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA


If you have a simple sample project showing the two issues, can you please send it to our support address?  Be sure to rename the .zip file extension so that it won't get spam blocked.

I have marked down the suggestion of supporting a single-value annotation line.

For the negative values issue, I wonder if the problem there is that you need to flip the Maximum and Minimum values.  I would think that the Maximum should be the higher (more positive) value.  Try to flip those and see if it fixes that problem.


Actipro Software Support
Information The latest build of this product (2018.1 build 0330) was released 2 months ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.