Customer login  |   Contact us
Home Company Products Support Purchase
Forum Home » ObjectPlanet Developer forum

Topic: linechart to display digital value
Replies: 0   Pages: 1  


Back to Topic List Back to Topic List
Replies: 0   Pages: 1  
jerry w

Posts: 1
Registered: Mar 27, 2013
linechart to display digital value
Posted: Mar 27, 2013 9:06 PM
  Reply

Hi, all,

I need to show multiple lines in the linechart.

some of them are analog, some are digital(0 or 1).

For the analog ones, I just use setSampleValues.

For the digital ones, I didn't find any existing satisfying way in linechart.

So, I came up with my own solution, but it does not always work.

My solution is : for any digital value, I draw this value first, and draw an extra 0 line in the same chart with the same range. Then, set the area between this digital line and the 0 line, paint the color to this area. By doing this, you will see the 0/1 very clear. This is very helpful when you have a lot lines, all of which have different ranges, in the same chart.

My problem is, when I add some analog values into this chart, lines are drawn, but the area bounded by digital line and 0 line are not painted.


Could somebody explain in more detail on the setArea() funciton ?
The first parameter is the area index, does it need to be defined first?

The second and third parameter are 2 lines that bounded the area, are these indices of the lines? When are these line indices defined ?

And setAreaColor() ? the area index in this function has to be defined in the setArea() function, does it have to be sequential from 0?

Or, any other suggestions ?

Thanks,
Jerry



© 1998-2017 ObjectPlanet, Inc. Øvre Slottsgate 5, 0157 Oslo, Norway Tel (+47) 2233 3360 | Fax (+47) 2233 3361