ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Data label in contour chart ?
Posted by Jacques Terrettaz on Oct-04-2013 16:41
Attachments:
Hello,

I am using a contour chart to display temperature forecast levels at different altitude, see
the first attached image (contour1.jpg).

Is there a way to display data labels for some values within the chart , as shown for
instance in the second attached image (here the labels were added manually -
contour2.jpg)?

Best Regards

Jacques
coutour1.JPG
coutour2.jpg

  Re: Data label in contour chart ?
Posted by Peter Kwan on Oct-05-2013 00:00
Hi Jacques,

Unluckily, ChartDirector cannot automatically put labels along a contour line.

If your code knows where are the points on the coutour line, you can use BaseChart.addText to add text label on those points. This is possible if your data really contain points on the contour line, or the data are "dense" so that is easy to estimate where is the contour point. However, in most applications, the data do not contain the contour points (eg. the data may have temperature = 13 and temperature = -7, but not have points for temperatue = 0). In this case, it is hard to estimate where are the contour points.

One method  you may consider to use different colors for these special lines. You may use Axis.addMark to set certain contour lines to have different colors or style (such as dash line style). For example, in C#/Java, it is like:

myContourLayer.colorAxis().addMark(0, 0x00ffff);

This may make it easier to identify the contour line.

Regards
Peter Kwan

  Re: Data label in contour chart ?
Posted by Jacques on Oct-05-2013 01:31
Peter,
thanks for your reply,

Changing the color of the lines is a good idea, I will explore this possibility.
One last question : is it possible to set the width of a particular contour line to a desired
value?

  Re: Data label in contour chart ?
Posted by Peter Kwan on Oct-07-2013 23:30
Hi Jacques,

Yes. If you want to control one particular contour line, you may use a mark line just line in my previous post.  For example:

Mark m = myContourLayer.colorAxis().addMark(0, 0x7f000000);
m.setLineWidth(2);

Hope this can help.

Regards
Peter Kwan

  Re: Data label in contour chart ?
Posted by Jacques on Nov-08-2013 03:03
Attachments:
Peter,

Thanks for  your advice.  With some tests, I tried to play with the width and color of the
lines.
And finally, it was better than having labels all around the chart, and it allowed me to add
wind vectors to the charts. Here is an exemple .

Regards

Jacques
prewrffull.php.png