Page 2 of 2

Re: Problem with DrawBarGraph

Posted: Fri Sep 06, 2013 8:17 pm
by chrisjx2002
You are right. It will be better in that way.

Re: Problem with DrawBarGraph

Posted: Sat Oct 12, 2013 3:35 pm
by chrisjx2002
I have made some changes in the h_graph.prg module. You will find attached the new module and a screenshot.

Re: Problem with DrawBarGraph

Posted: Sat Oct 12, 2013 4:42 pm
by srvet_claudio
chrisjx2002 wrote:I have made some changes in the h_graph.prg module. You will find attached the new module and a screenshot.
Please explain changes and the improvements in the code and in the graph.
Best regards,
Claudio.

Re: Problem with DrawBarGraph

Posted: Sat Oct 12, 2013 5:53 pm
by chrisjx2002
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.

Problem with DrawBarGraph

Posted: Mon Oct 14, 2013 1:31 pm
by Pablo César
I put back in the file enclosed the value like nRes,... even if there are not used for the moment.
What do you think if yourself can make nRes useable ? Would it be great ! :)
chrisjx2002 wrote:And don't hesitate to test it.... ;)

Feel free to ask me for more questions if necessary.
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.

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:
Graph.PNG
Graph.PNG (125.49 KiB) Viewed 3761 times
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.

Re: Problem with DrawBarGraph

Posted: Tue Oct 15, 2013 5:18 pm
by chrisjx2002
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...

Problem with DrawBarGraph

Posted: Tue Oct 15, 2013 9:22 pm
by Pablo César
Good to make PRG file sample without rebuilding lib. :)

I still insist to see my previous image of graph:

Image

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.