Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
Home » U++ Library support » ScatterDraw & ScatterCtrl » Ideas: Grid lines at "round" dates or values. More options for tooltip.
Ideas: Grid lines at "round" dates or values. More options for tooltip. [message #51787] Thu, 30 May 2019 12:07 Go to next message
Maginor is currently offline  Maginor
Messages: 7
Registered: May 2019
Promising Member

I have come across a few things that I think could be improved for scientific plotting. I respect that this project is done on people's free time, I am just throwing in some ideas that are of course just my opinion.

I have a graph of daily values. I can use grid unit formatting to get the X axis to display the dates just fine. However, my problem is that the grid lines show up at fairly "random" places. For instance, if I zoom out far enough, I want the grid lines to be at Jan. 1st of every year, but if I zoom in more, I want them to be at the 1st of each month etc (whatever more closely fits the desired amount of grid lines). There could also be some steps in between such as showing a line each half year or each quarter year when appropriate.

This is a graph that the user can freely zoom around in, so it has to be able to update this dynamically.

There does not seem to be any native support for this, and the only way I can see to set the grid lines is by setting their beginning, spacing and count. This will not work for this purpose since Jan. 1st of each year is not equally spaced because of leap years, and similarly months are not equally spaced.

Moreover, I sometimes have data series of just monthly or yearly values, and in those cases I would like the grid lines (of the X axis) to be only where there are data points, never in between.

Another thing I am looking for is that I would like to tell the plot to try to snap grid lines to round values as a default. I.e. I want lines at (0.25, 0.5, 1, 1.25, 1.5, 1.75) rather than (0.05, 0.67, 1.3, 1.92) even if my Y axis happens to range from (0.05 to 1.92). This is something I can do myself just by doing some computations, so it is not a big deal, but it would be nice to have it as an option.

Another thing (Sorry!!):
The tooltip (SHOW_INFO action) in ScatterCtrl shows the x and y position of the cursor. I would like an option for it to show the y value of the graph at that x point (i.e. show (x, f(x)) rather than (x, y)).

If there are multiple graphs, I'm not sure how that should be handled, but maybe either show a list of the values of all the graphs or just show the value of the closest graph to the cursor.
If it is a scatter plot rather than a continuous line plot, it would maybe be good to show the value of the closest point on the graph. Similarly, for bar plots it would be good to show the values of the closest bar.

Again, I am very thankful that this library exists at all. I am just throwing in some ideas.

[Updated on: Thu, 30 May 2019 12:12]

Report message to a moderator

Re: Ideas: Grid lines at "round" dates or values. More options for tooltip. [message #51790 is a reply to message #51787] Thu, 30 May 2019 16:44 Go to previous message
koldo is currently offline  koldo
Messages: 2959
Registered: August 2008
Hello Maginor

Thank you, all your comments are valid.

You propose interesting features. Some of them can be solved using cbModifFormat* callbacks, but not all. A feature I have never known how to do it is a general and precise zooming algorithm: advices are really acknowledged!

Other feature always waiting to be implemented has been to choose series and series points with a mouse click. If you need this, It will be implemented.

Best regards
Previous Topic: [Feature request] Gap in line at NaN values
Goto Forum:

Current Time: Sun Jun 16 19:20:47 CEST 2019

Total time taken to generate the page: 0.00878 seconds