Problem with DrawBarGraph
Moderator: Rathinagiri
-
- Posts: 192
- Joined: Wed Jan 06, 2010 5:39 pm
Re: Problem with DrawBarGraph
You are right. It will be better in that way.
-
- Posts: 192
- Joined: Wed Jan 06, 2010 5:39 pm
Re: Problem with DrawBarGraph
I have made some changes in the h_graph.prg module. You will find attached the new module and a screenshot.
- Attachments
-
- Graph.jpg (57.59 KiB) Viewed 3818 times
-
- h_graph.zip
- (7.07 KiB) Downloaded 223 times
- srvet_claudio
- Posts: 2220
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Problem with DrawBarGraph
Please explain changes and the improvements in the code and in the graph.chrisjx2002 wrote:I have made some changes in the h_graph.prg module. You will find attached the new module and a screenshot.
Best regards,
Claudio.
-
- Posts: 192
- Joined: Wed Jan 06, 2010 5:39 pm
Re: Problem with DrawBarGraph
The modifications are :
- boundaries of the graph are now 31 and 30 instead of 16 and 15 in order to be able to print graph for days of a month. I don't test this program with higher values.
- the show yLabels is changed in order to print the ylabels in the middle of the bars section (I have add a small modification in the h-graph.prg file in order to make this modification only for bars and not for lines or points)
- The section if nType == BARS is changed for the nPos value which was wrong
I put back in the file enclosed the value like nRes,... even if there are not used for the moment.
And don't hesitate to test it....
Feel free to ask me for more questions if necessary.
- boundaries of the graph are now 31 and 30 instead of 16 and 15 in order to be able to print graph for days of a month. I don't test this program with higher values.
- the show yLabels is changed in order to print the ylabels in the middle of the bars section (I have add a small modification in the h-graph.prg file in order to make this modification only for bars and not for lines or points)
- The section if nType == BARS is changed for the nPos value which was wrong
I put back in the file enclosed the value like nRes,... even if there are not used for the moment.
And don't hesitate to test it....

Feel free to ask me for more questions if necessary.
- Attachments
-
- h_graph.zip
- (7.16 KiB) Downloaded 241 times
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Problem with DrawBarGraph
What do you think if yourself can make nRes useable ? Would it be great !I put back in the file enclosed the value like nRes,... even if there are not used for the moment.

Hi Chris, thank you for your big interest and efforts for improving this ressource and sample. I think is the only way to improve something when we give place to others for comments and making questions.chrisjx2002 wrote:And don't hesitate to test it....![]()
Feel free to ask me for more questions if necessary.
I am still in doubts with mathematical definitions about sizes and postioning. At your last picture shows all bars have passed to the vertical cordinates lines. See here in red/margenta color with arrow where it should not exceed: My another suggestion is to take same example and post with this your source code improved, just we can test it without re-building lib. This will help a lot.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 192
- Joined: Wed Jan 06, 2010 5:39 pm
Re: Problem with DrawBarGraph
The magenta line is not linked to the back side of the bar but to the front side then it is correct (3D effect).
You will find attached the example including the h-graph module. Then it is not necessary to rebuild the lib.
I don't know exactly what is the nRes parameter. To activate it needs some tests. I try that when I will have enough time... not simple...
You will find attached the example including the h-graph module. Then it is not necessary to rebuild the lib.
I don't know exactly what is the nRes parameter. To activate it needs some tests. I try that when I will have enough time... not simple...
- Attachments
-
- demobar.zip
- (7.61 KiB) Downloaded 247 times
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Problem with DrawBarGraph
Good to make PRG file sample without rebuilding lib. 
I still insist to see my previous image of graph:

You will see first block (january) accompany persperctive, is inclined and the end of first block ends at second vertical line as start a new month.
The second block in your image starts exactly on the second vertical line. And IMO should be starts before, keeping the persperctive alined.

I still insist to see my previous image of graph:
You will see first block (january) accompany persperctive, is inclined and the end of first block ends at second vertical line as start a new month.
The second block in your image starts exactly on the second vertical line. And IMO should be starts before, keeping the persperctive alined.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein