Author Topic: Combined Charts  (Read 742 times)

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 896
  • ObjAsm Developer
    • ObjAsm
Combined Charts
« on: December 29, 2021, 06:02:57 AM »
Hi
It's finally done. I merged the code paths of the Bar and XY-point charts.
This resulted in a more compact and robust code base.
I also completed support for the secondary Y axis.  :cool:

I would be happy if someone would like to test the binaries.  :biggrin:
I didn't enable exception handling to see if there were any problems.
The full source is uploaded to github.

You can interact with the diagrams in the following ways:
  • Left button mouse drag: pans the series associated with the primary Y axis
  • Right button mouse drag: pans the series associated with the secondary Y axis
  • Left button mouse drag + Ctrl Key: zooms the series associated with the primary Y axis
  • Right button mouse drag + Ctrl Key: zooms the series associated with the secondary Y axis
  • Double click on an axis + Ctrl Key: reset the axis using the automatic scale values
  • Double click on any element of the chart: opens the setup dialog on the corresponding Tab
  • Gestures: zoom and pan enabled

Biterider


HSE

  • Member
  • *****
  • Posts: 2091
  • AMD 7-32 / i3 10-64
Re: Combined Charts
« Reply #1 on: December 30, 2021, 05:31:27 AM »
Hi Biterider!

Look very good :thumbsup:

Could be interesting that reset of Y1-axis use "predefined scale" instead of "automatic scale". That could be an option in all axis.

Regards, HSE.
Equations in Assembly: SmplMath

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 896
  • ObjAsm Developer
    • ObjAsm
Re: Combined Charts
« Reply #2 on: December 30, 2021, 07:01:07 AM »
Hi HSE
Thanks for testing!  :thumbsup:

Currently I have 2 sets of values for each scale, the auto-values, which are set from the scanning process (scan method) and the current values. Those last ones, are set at the beginning when the control is created. When the intention is to revert to these values, then we have to store them too (e.g. fInitialMin, fInitialMax).
Maybe a double click + ctrl + shift keys can trigger the resetting to those values...

Note: it would be mandatory to set these initial values or we have to check if they were set! Otherwise ugly things will happen  :sad:

Biterider

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 9380
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Combined Charts
« Reply #3 on: December 30, 2021, 09:58:33 AM »
The chartbar works really well, I could not get the arrange button to do anything but the others worked correctly and resizing that main window also scaled the child windows correctly.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 896
  • ObjAsm Developer
    • ObjAsm
Re: Combined Charts
« Reply #4 on: December 30, 2021, 06:11:21 PM »
Hi Hutch
Thanks for testing the application  :thup:

The menu command "Arrange icons" issues a WM_MDIICONARRANGE message to the application MDI-Client window.
https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-mdiiconarrange

You can see what it does when you have a lot of disorganized minimized child windows floating around and you hit that menu command.

Biterider

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 896
  • ObjAsm Developer
    • ObjAsm
Re: Combined Charts
« Reply #5 on: December 31, 2021, 03:37:02 AM »
Hi HSE
I refactored the code a bit to simplify the setup work and introduced the initial setup values.
Now you can reset the scales to these very beginning values by double clicking the scale and pressing CTRL and SHIFT at the same time.

Biterider

HSE

  • Member
  • *****
  • Posts: 2091
  • AMD 7-32 / i3 10-64
Re: Combined Charts
« Reply #6 on: December 31, 2021, 04:02:43 AM »
Hi Biterider!

Fantastic  :thumbsup:

HSE
Equations in Assembly: SmplMath