DCRMCHART

This forum is for eXpress++ general support.
Post Reply
Message
Author
c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

DCRMCHART

#1 Post by c-tec »

Hello Roger,
Hallo,
DCRMCHART is very helpful for me, but get in my attached sample only a empty dialog and connot finde the problem. Can you see anything wrong ?
In my latest eXpress++ version some samples in RMCHART.EXE do not work, get for example in Grid based -> grouped bars, a "type conflict" in "setproperties" in _GROUPEDBARS(235)

regards
Rudolf

Code: Select all

static function bargroup1(aDataM,aDataW,cFilename)
******************************************************************
local getlist := {},oRMChart,aBarGroup := {},aDataAxis1 := {},oRegion1,aAxis := {},nMaxM := 0,nMaxW := 0,nMax,nTmp,nAxis
ALTD()

aDataM := {100,200, 30, 40, 30, 30, 60, 10, 100,250}
aDataW := { 50, 10,200, 30, 50, 80, 20, 60,  70, 90}
cFilename := "test.jpg"


nMaxM := maxval(aDataM)
nMaxW := maxval(aDataW)
nMax := max(nMaxW,nMaxM)
nTmp := int(nMax/10)
nAxis := 0
for x := 1 to 10
     aadd(aAxis,ntrim(nAxis))
     nAxis += nTmp
next x

@ 0,0 DCRMCHART oRmChart SIZE 600, 450 PIXEL

DcAddBarGroup TO aBarGroup DATA aDataM TYPE RMC_BARGROUP COLOR CornflowerBlue
DcAddBarGroup TO aBarGroup DATA aDataW TYPE RMC_BARGROUP COLOR Gold
DcAddDataAxis TO aDataAxis1 LABELTEXT aAxis

@ 0,0 DcChartRegion oRegion1 ;
   PARENT oRMChart ;
   FOOTER "RM chart test" ;
   SIZE 600, 400 PIXEL ;
   CAPTION TITLE 'Title' ;
   GRID ;
   LEGEND TEXT { 'male', 'female' } ;
   DATAAXIS aDataAxis1 ;
   LABELAXIS LABELARRAY { "0-2","3-5","6-13","14-17","18-20","21-24","25-34","35-49","50-64","65 and older" } ;
   BARGROUP aBarGroup
dcread gui fit
return .t.
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: DCRMCHART

#2 Post by c-tec »

Hello Roger,
found it ! I did not call the draw() Method.
Now I only have a little problem with the bars, they do not fit compard to the axis, they ar going to the top of the chart window between the upper lables. Its the result from the sample I sent bevore. How can i change this behaviour ?
regards
Rudolf
Attachments
test.jpg
test.jpg (41.52 KiB) Viewed 11432 times
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCRMCHART

#3 Post by rdonnay »

Make the changes as shown below marked with <<<<<<<

Code: Select all

for x := 1 to 11  <<<<<<<
     aadd(aAxis,ntrim(nAxis))
     nAxis += nTmp
next x

@ 0,0 DCRMCHART oRmChart SIZE 600, 450 PIXEL

DcAddBarGroup TO aBarGroup DATA aDataM TYPE RMC_BARGROUP COLOR CornflowerBlue
DcAddBarGroup TO aBarGroup DATA aDataW TYPE RMC_BARGROUP COLOR Gold
DcAddDataAxis TO aDataAxis1 LABELTEXT aAxis TICKCOUNT 11 MINVALUE 0 MAXVALUE 250 <<<<<<<<
The eXpress train is coming - and it has more cars.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: DCRMCHART

#4 Post by c-tec »

Hello Roger,
did not change the result. Attached a small sample and a screenshot. I have now moved the highest columns in the middle to see the effect better.
regards
Rudolf

Code: Select all

static function bargroup1()
******************************************************************
local getlist := {},oRMChart,aBarGroup := {},aDataAxis1 := {},oRegion1,aAxis := {},aDataM,aDataW

aDataM := { 30,200, 30, 40,250, 30, 60, 10, 100,250}
aDataW := { 50, 10,200, 30,240, 80, 20, 60,  70, 90}
aAxis  := {"1" ,"2","3","4","5","6","7","8","9","10","11"}
@ 0,0 DCRMCHART oRmChart SIZE 600, 450 PIXEL

DcAddBarGroup TO aBarGroup DATA aDataM TYPE RMC_BARGROUP COLOR CornflowerBlue
DcAddBarGroup TO aBarGroup DATA aDataW TYPE RMC_BARGROUP COLOR Gold
DcAddDataAxis TO aDataAxis1 LABELTEXT aAxis

@ 0,0 DcChartRegion oRegion1 ;
   PARENT oRMChart ;
   FOOTER "RM chart test" ;
   SIZE 600, 400 PIXEL ;
   CAPTION TITLE 'Title' ;
   GRID ;
   LEGEND TEXT { 'male', 'female' } ;
   DATAAXIS aDataAxis1 ;
   LABELAXIS LABELARRAY { "1","2","3","4","5","6","7","8","9","10" } ;
   BARGROUP aBarGroup

dcread gui fit EVAL {||oRmChart:draw()}

return .t.

Attachments
2016-08-05_10h27_16.png
2016-08-05_10h27_16.png (21.85 KiB) Viewed 11394 times
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

Wolfgang Ciriack
Posts: 484
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: DCRMCHART

#5 Post by Wolfgang Ciriack »

Hi Rudolf,
you did not change this line

Code: Select all

DcAddDataAxis TO aDataAxis1 LABELTEXT aAxis TICKCOUNT 11 MINVALUE 0 MAXVALUE 250 <<<<<<<<
_______________________
Best Regards
Wolfgang

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: DCRMCHART

#6 Post by c-tec »

Hello Wolfgang,
thank you, it works now perfect ! I should take a closer look at the include file and the samples. It's fascinating what you can do with a few lines of eXpress++ code and RMCHART.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

Post Reply