Xojo Conferences
XDCMay2019MiamiUSA

[MBS] is it possible to do filled stepped line in chart director? (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] MouseDown handler for QLPreviewViewControlMBS?
Next thread: [MBS] [ANN] 15.1pr4


Re: [MBS] PortAudioStreamRecorderMBS issue   -   Garth Hjelte
  [MBS] is it possible to do filled stepped line in chart director?   -   James Sentman
   Re: [MBS] is it possible to do filled stepped line in chart director?   -   James Sentman
   Re: [MBS] is it possible to do filled stepped line in chart director?   -   Christian Schmitz

[MBS] is it possible to do filled stepped line in chart director?
Date: 12.04.15 16:18 (Sun, 12 Apr 2015 11:18:13 -0400)
From: James Sentman
Good morning!

I see the CDAreaLayerMBS class for doing graphs that are filled below the line, and I see the CDStepLineLayerMBS for doing graphs that step from one value to another, which is what I want. But I can't see a stepped area layer that would do the same fill in for a stepped line layer. I can almost wrap my head around adding a line fill below the steplinelayer, but I can't make it happen in an actual graph.

Any advice or suggestions greatly appreciated, thank you!

Thanks,
James

James Sentman http://sentman.com http://MacHomeAutomation.com


_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] is it possible to do filled stepped line in chart director?
Date: 14.04.15 15:54 (Tue, 14 Apr 2015 10:54:47 -0400)
From: James Sentman
This worked perfectly! Thank you!

Missed the magic -9999 number for negative infinity without messing up the autoranging of the indexes. Perfect thank you.

> On Apr 13, 2015, at 12:42 PM, Christian Schmitz <<email address removed>> wrote:
>
> (a) With the "InterLineLayer", you can vertically fill (horizontally fill if swapXY is in effect) between any two lines from any other following sources:
> - LineLayer, StepLineLayer and SplineLayer and Mark lines. For example like:
>
> 'A step line layer
> Set myLayer as CDStepLineLayerMBS = c.addStepLineLayer(..................)
>
> 'Fill betwen a step line layer and a mark line at "negative infinitely" (which means just fill to the bottom of the plot area)
> Call c.addInterLineLayer(myLayer.getLine(), c.yAxis().addMark(-9999, cd.kTransparent).getLine(), &H7fff0000)

Thanks,
James

James Sentman http://sentman.com http://MacHomeAutomation.com


_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] is it possible to do filled stepped line in chart director?
Date: 13.04.15 17:42 (Mon, 13 Apr 2015 18:42:54 +0200)
From: Christian Schmitz

> Am 12.04.2015 um 17:18 schrieb James Sentman <<email address removed>>:
>
> Good morning!
>
> I see the CDAreaLayerMBS class for doing graphs that are filled below the line, and I see the CDStepLineLayerMBS for doing graphs that step from one value to another, which is what I want. But I can't see a stepped area layer that would do the same fill in for a stepped line layer. I can almost wrap my head around adding a line fill below the steplinelayer, but I can't make it happen in an actual graph.

Yes. There are two methods:

(a) With the "InterLineLayer", you can vertically fill (horizontally fill if swapXY is in effect) between any two lines from any other following sources:
- LineLayer, StepLineLayer and SplineLayer and Mark lines. For example like:

'A step line layer
Set myLayer as CDStepLineLayerMBS = c.addStepLineLayer(..................)

'Fill betwen a step line layer and a mark line at "negative infinitely" (which means just fill to the bottom of the plot area)
Call c.addInterLineLayer(myLayer.getLine(), c.yAxis().addMark(-9999, cd.kTransparent).getLine(), &H7fff0000)

(b) You can create an area layer using data the contains steps. For example:

xCoor = Array(0, 3, 3, 5, 5, 7)
yCoor = Array(10, 10, 20, 20, 30, 30)

Set myLayer as CDAreaLayerMBS = c.addAreaLayer(yCoor)
Call myLayer.setXData(xCoor)


Sincerely
Christian