2
* This file is part of the dis-Emi-A HaXe Library. Copyright © edA-qa mort-ora-y
3
* For full copyright and license information please refer to doc/license.txt.
10
class ChartTest extends ui.StageLayout
13
[ 3.4, 1.2, 9.7, 13.2, 4.5 ] ,
14
[ null, 10.0, 11.5, 14.0, 9.0 ]
16
static var series = [ "You", "Max" ];
17
static var labels = [ "Data", "Frogs", "Squix", "Muggles", "Sampson" ];
19
var panel : LayerPanel;
26
var buttons = ui.LinearLayout.vertical();
27
layout.add( buttons );
29
panel = LayerPanel.exclusive();
30
layout.add( panel, ui.SizeType.Fill(1) );
33
[ "Line", ui.Chart.line( labels, series, data,
34
{ integralRange: true,
35
vertexShape: draw.fragments.Polygon.shape( { sides: 5 } ),
36
rangeLines: [ 7.6, 11.2 ],
38
[ "Pie", ui.Chart.pie( labels, data[0] ) ],
39
[ "Bar", ui.Chart.bar( labels, series, data,
40
{ highlightFirst: true, title: "My Bar Chart" } ) ],
41
[ "Pie2", ui.Chart.pie( labels, data[0],
42
{ verticalLegend: false }
44
[ "Pie3", ui.Chart.pie( labels, data[0],
45
{ verticalLegend: false, legendColumns: 3 }
49
for( i in 0...charts.length )
51
buttons.add( ui.Button.plain( ui.Action.bind1( onSelect, i ), charts[i][0] ) );
52
panel.add( charts[i][1] );
56
function onSelect( pi : Int )
58
panel.displayPanel( pi );
61
static public function main()
63
ui.StageLayout.setup( ChartTest );
66
define(IsHorizontalLayout,)
67
include(ui/MixinLayout.ihx)