gdipCharts - draw charts on your GUI using GDI+

Post your working scripts, libraries and tools for AHK v1.1 and older
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: gdipCharts - draw charts on your GUI using GDI+

12 May 2017, 12:33

It is pretty straightforward stuff, although a little rough :lol: . If you want similar functionality integrated, you'd probably want to separate the preview and data generation, and adjust parameters/methods to better fit your style for consistency and preference. Cheers.
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Grid Fix

19 May 2017, 07:59

There seems to be a bug with it though - that's why I haven't uploaded the second picture.
The first one is online though now.
For now I fixed the grids and some minor bugs in one of the includes and updated all examples to showcase what I did.
I also think I fixed a bug with setFreezeRedraw while I was at it.
Recommends AHK Studio
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: gdipCharts - draw charts on your GUI using GDI+

24 May 2017, 14:01

I'm going to upload a new Version featuring labels this week. You can already take a peek at how it is going to look on GitHub.
Then I'm going update the description page here.
After that I'm going to enhance some of the styling options. ( And generally make it more beatiful )
That is followed by enhancing ways to get and set new information.
Finally I will add markers which can be used on parts/points of graphs to to highlight and/or summarize their information.
Recommends AHK Studio
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: gdipCharts - draw charts on your GUI using GDI+

28 May 2017, 09:37

This may prove useful if I ever decide to upgrade the Biorhythm script to get rid of RMChart. Got one question though: is there - or will it be - an option to draw a custom grid such as the one in the screenshot below instead of the square one?
20170528172754.png
Biorhythm screenshot
20170528172754.png (67.95 KiB) Viewed 4616 times
Part of my AHK work can be found here.
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: gdipCharts - draw charts on your GUI using GDI+

28 May 2017, 12:16

Yeah GridScaling will still be modified a lot. ( e.g. Scale depending on which format the Labels have )
However I'm nowhere that far yet.
The reason why I take rather long for the recent updates is that I have noticed that I am in need of a geometry class and a better Canvas - so I'm writing every new function with that in mind.
Recommends AHK Studio
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: gdipCharts - draw charts on your GUI using GDI+

28 May 2017, 12:30

OK, thank you, I'll be watching for updates. Good luck! :)
Part of my AHK work can be found here.
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: gdipCharts - draw charts on your GUI using GDI+

29 May 2017, 12:03

I guess I will have to postpone the Label update.
The latest Version of the Script should already be able to solve most needs.
In the meantime I will work on getting a new proper Rendering pipeline and a better way to deal with geometry.
Until then.
Recommends AHK Studio
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: gdipCharts - draw charts on your GUI using GDI+

29 May 2017, 12:28

nnnik, a question, instead of drawing the chart on a GUI/control, could one get a bitmap handle instead?
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: gdipCharts - draw charts on your GUI using GDI+

29 May 2017, 13:31

Yeah the bitmap Object is stored in chart.bitmap.
You can use Bitmap.getpBitmap() if you want it's pBitmap.
Recommends AHK Studio
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: gdipCharts - draw charts on your GUI using GDI+

01 Jun 2017, 01:46

This was a rather large update - yet I'm not done with Labels.
However they won't change that much anymore.
Today I will work on the documentation for this project - as promised.
Recommends AHK Studio
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: gdipCharts - draw charts on your GUI using GDI+

01 Jun 2017, 17:18

I will probably remove all the documentation on this site since I have moved it to github
https://github.com/nnnik/gdiChartLib/wiki
Recommends AHK Studio
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

Re: gdipCharts - draw charts on your GUI using GDI+

01 Jun 2017, 17:32

I like how the three steps start from zero. :P :D
Just kiddin'. Keep up the good work! ;)
Part of my AHK work can be found here.
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: gdipCharts - draw charts on your GUI using GDI+

02 Jun 2017, 02:50

Well yeah I wanted to mention what needs to be prepared yet don't think that this counts as being part of creating the chart.
Recommends AHK Studio
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: gdipCharts - draw charts on your GUI using GDI+

03 Jun 2017, 08:25

To complete the wiki I will probably add a page each day - since I have a test coming up I won't do any more.
Recommends AHK Studio
jeongrak2
Posts: 1
Joined: 29 Jul 2019, 06:18

Re: gdipCharts - draw charts on your GUI using GDI+

26 Mar 2020, 05:23

how to make Candle chart ?
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Re: gdipCharts - draw charts on your GUI using GDI+

17 Aug 2021, 08:30

How can data be added to an array and visualized in gdipCharts? I read the documentation, but I didn't see any examples of pushing to an array. The code below does not work.
Any help and guidance would be appreciated.

Code: Select all

#SingleInstance Force
#Include gdipChart.ahk

DataVar := []
Loop, 14
	{
	DataVar.Push(A_Index * 2)
	}

GUI +hwndGUI1 ;get the windows hWND
chart := new gdipChart( GUI1, "", [ 0, 0, 15, 30 ] )
stream := chart.addDataStream( DataVar ) ; this line doesnt work
;stream := chart.addDataStream( [[1,2], [2,4], [3,6], [4,8], [5,10], [6,12], [7,14], [8,16], [9,18], [10,20], [11,22], [12,24], [13,26], [14,28]] ) ; this line does work.
stream.setVisible()
chart.setVisible()
GUI,Show,w600 h400
return

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 94 guests