#include <Chart UDF.au3>
;Gui
$hGui=GUICreate("BalkenDiagramm",870,570)
$Button=GUICtrlCreateButton("Delete Chart 1",120,140)
GUISetState()
;Data Array
global $aData=[["voltagedrop [U] Bronze",1.77],["voltagedrop [U] Stahl",2.02]]
;Horizontal Chart
$Chart1=__Chart_showChart($hGui,5,20,450,120,$aData,10,"hori",1.65,2.05)
;Vertical Chart
$Chart2=__Chart_showChart($hGui,5,150,100,400,$aData,10,"vert",1.65,2.05)

;Data Array Colored
global $aDataColored=[["M",255,0xFFFF0000],["W",500,0xFF00FF00]]
;Horizontal Chart Colored
$Chart3=__Chart_showChart($hGui,460,20,400,120,$aDataColored,10,"hori",0,1000)
;Vertical Chart Colored
$Chart4=__Chart_showChart($hGui,460,150,120,400,$aDataColored,10,"vert",0,1000)

$Counter=0
while Sleep(10)
	Switch GUIGetMsg()
		Case -3
			exit
		Case $Button
			__Chart_deleteChart($hGui,$Chart1)
	EndSwitch
WEnd