|
|
Home » Community » U++ community news and announcements » New graph packages
|
|
Re: New graph packages [message #35616 is a reply to message #35615] |
Tue, 06 March 2012 21:17 |
Didier
Messages: 680 Registered: November 2008 Location: France
|
Contributor |
|
|
Hi Koldo,
Quote: | First was Andrei-Catalin, then I added new things, after that dolk.rce did a new package... many efforts for only one package, and there are many new packages to do...
|
I really need a good Graph ctrl and neither PlotCtrl nor ScatterCtrl fit my needs (which are quite simple) .
My goal is not to make yet another Graph Ctrl but to use the maximum of what you created and only rebuilding what needs to.
In fact all the formulas are very complicated (to much) and it's very difficult and tricky to enhance it.
I am focusing on the following points:
- Axis management : drawing/steps management/min-max mondification
- Calculation simplification
- Axis/title/legend position : make all these items modifiable
I dont need to rebuild data painting, the one you build is fine and configurable
So I hope I can comme up with something that can easily be merged with ScatterCtrl
Anyway, even if it finally goes to trash, it's the first time I try to build a Ctrl from scratch, so I will learn many things
[Updated on: Tue, 06 March 2012 22:06] Report message to a moderator
|
|
|
|
Re: New graph packages [message #35619 is a reply to message #35616] |
Wed, 07 March 2012 08:02 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
Didier wrote on Tue, 06 March 2012 15:17 |
So I hope I can comme up with something that can easily be merged with ScatterCtrl
Anyway, even if it finally goes to trash, it's the first time I try to build a Ctrl from scratch, so I will learn many things
|
Well, creating Ctrl from scratch certainly has its educational value.
Long term, I wish there was only one graphing package, which should evolve from current ScatterCtrl. So let us hope your code will be easy to merge
Meanwhile, if you want your code public, please commit it to sandbox (not bazaar).
Mirek
|
|
|
|
|
Re: New graph packages [message #35628 is a reply to message #35623] |
Wed, 07 March 2012 22:24 |
Didier
Messages: 680 Registered: November 2008 Location: France
|
Contributor |
|
|
Quote: | Well, creating Ctrl from scratch certainly has its educational value.
|
Mainly for fun
Quote: | Long term, I wish there was only one graphing package, which should evolve from current ScatterCtrl. So let us hope your code will be easy to merge Smile
|
Several parts of ScatterCtrl can be separated (which I did for needs):
- SeriesPlot
- MarkPlot
- DrawingFunctions
- DataSource
I will use them "as is" if possible
So if Koldo can do a clean Separation of these parts from the ScatterCtrl merge could be trivial
Currently I have introduced a GridAxisDraw class that draws the axis and also Grid. The main point is to make grid/axis look extendable and also make grid steps extendable (through class derivation). For ex: maybe I need the steps have certain periodicity or for log a different representation.
This class also contributes to the coordinate conversion ==> this way we could click on the axis, modify ranges/scale ==> and grid/points tied to this axis (and only these points get rescaled)
NB: the coordinate conversion is not owned by this class, another helper class is in charge of this.
Quote: |
Meanwhile, if you want your code public, please commit it to sandbox (not bazaar).
|
When I have something that I find "publishable" I will do it.
[Updated on: Wed, 07 March 2012 22:26] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: New graph packages [message #35672 is a reply to message #35662] |
Sun, 11 March 2012 22:42 |
|
Hi Koldo
koldo wrote on Sun, 11 March 2012 18:16 | This functions:
Color GetNewColor(int id);
String GetNewDash(int id);
MarkPlot *GetNewMarkPlot(int id);
are already protected because they are only used in ScatterDraw classes and subclasses, so apparently they do not need to be out.
|
Simple usecase where having these methods publicly available would be very helpful:
If there is multiple series, I would call GetNewColor(my_series_id) to assign color after each ordering change (where my_series_id is some unique identification of the series that doesn't depend on it's position in graph). The goal is to keep the colors the same even when some series are removed, added or sorted differently. It helps to keep the graphs easily "readable"
The same holds for GetNewDash and for GetNew_MarkPlot... Please consider making them publicly available, all it will cost you is three declarations in header file
Best regards,
Honza
|
|
|
|
|
Re: New graph packages [message #35678 is a reply to message #35676] |
Mon, 12 March 2012 10:45 |
|
koldo wrote on Mon, 12 March 2012 09:12 |
dolik.rce wrote on Sun, 11 March 2012 22:42 | Hi Koldo
koldo wrote on Sun, 11 March 2012 18:16 | This functions:
Color GetNewColor(int id);
String GetNewDash(int id);
MarkPlot *GetNewMarkPlot(int id);
are already protected because they are only used in ScatterDraw classes and subclasses, so apparently they do not need to be out.
|
Simple usecase where having these methods publicly available would be very helpful:
If there is multiple series, I would call GetNewColor(my_series_id) to assign color after each ordering change (where my_series_id is some unique identification of the series that doesn't depend on it's position in graph). The goal is to keep the colors the same even when some series are removed, added or sorted differently. It helps to keep the graphs easily "readable"
The same holds for GetNewDash and for GetNew_MarkPlot... Please consider making them publicly available, all it will cost you is three declarations in header file
Best regards,
Honza
|
Hello Honza
Is perhaps the solution to add some kind of graph KEY or ID as in GridCtrl?
|
Yes, that would solve the situation from the other side It seems little bit more difficult to implement this way, but possibly more versatile.
Honza
|
|
|
|
Goto Forum:
Current Time: Fri Apr 26 14:22:51 CEST 2024
Total time taken to generate the page: 0.05277 seconds
|
|
|