dc_bargraph error?

This forum is for eXpress++ general support.
Post Reply
Message
Author
reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

dc_bargraph error?

#1 Post by reganc »

Roger

We found a while back that dc_bargraph() when writing the text under the graph was not showing the full text. For some reason it was only showing the top half of the letters in each word.

Following is the line in _dc_graph.prg that causes the issue around line 980:

::textObjects:setsize({30,10})

Before this line the text object sizes have been calculated using the textfont and displayed using DCSAY. In my case on my PC the max font height has been calculated as 26. Obviously the above shrinks the text objects down losing the top half of the text that would have been shown.

I commented out this line and it works as expected. I could not work out what the line was supposed to do.

I also found one other minor glitch involving the scale text and the billion/million/thousand division handling too, I believe the str( width parameter should always be 5 or you end up with asterisks.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

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

Re: dc_bargraph error?

#2 Post by rdonnay »

Regan -

I am surprised that you are using the old DCBARGRAPH stuff.

Have you thought of using DCRMCHART instead?

Roger
The eXpress train is coming - and it has more cars.

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: dc_bargraph error?

#3 Post by reganc »

rdonnay wrote:Regan -

I am surprised that you are using the old DCBARGRAPH stuff.

Have you thought of using DCRMCHART instead?

Roger
I thought you might say that... :-)

Yes, we thought about it and decided not to go that route at the moment. All our existing customers would have problems with the registration of a new ActiveX control.

If there was a way to register the control on the fly, only if required, with no user interaction, then it would be possible, but I have not seen such a thing mentioned. Or did I miss something?

I have had a quick look at what RMCHART can do and it looks very good but until such time as we can roll it out to our customers and register it easily we are stuck.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: dc_bargraph error?

#4 Post by Koverhage »

Regan,

there is a wrapper for the RMCHART DLL available.
http://www.xbaseforum.de/
Klaus

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

Re: dc_bargraph error?

#5 Post by rdonnay »

If there was a way to register the control on the fly, only if required, with no user interaction, then it would be possible
Yes, I do this all the time.
I have a customer who distributes software all around the world.
It relies heavily on RMCHART.

Just put this in your startup code:

Code: Select all

cRegQuery := DC_RegQuery(HKEY_CLASSES_ROOT,'\CLSID\{4D814D0F-7D71-4E7E-B51E-2885AD0ED9D7}','') // RmChart 4.xx
IF (Valtype(cRegQuery) # 'C' .OR. Empty(cRegQuery)) .AND. File('RMCHART.OCX')
  RunShell('rmchart.ocx /s','RegSvr32.Exe')
ENDIF
The eXpress train is coming - and it has more cars.

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: dc_bargraph error?

#6 Post by reganc »

rdonnay wrote:
If there was a way to register the control on the fly, only if required, with no user interaction, then it would be possible
Yes, I do this all the time.
I have a customer who distributes software all around the world.
It relies heavily on RMCHART.

Just put this in your startup code:

Code: Select all

cRegQuery := DC_RegQuery(HKEY_CLASSES_ROOT,'\CLSID\{4D814D0F-7D71-4E7E-B51E-2885AD0ED9D7}','') // RmChart 4.xx
IF (Valtype(cRegQuery) # 'C' .OR. Empty(cRegQuery)) .AND. File('RMCHART.OCX')
  RunShell('rmchart.ocx /s','RegSvr32.Exe')
ENDIF
Ah, so there is a way. Thanks for that it may come in useful!
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

Post Reply