-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConsole.php
71 lines (64 loc) · 1.88 KB
/
Console.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
declare(strict_types=1);
/*
* This file is part of the Alight package.
*
* (c) June So <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Alight\Admin;
class Console
{
public static array $config = [];
private static int $index = 0;
public const
CHART_AREA = 'Area',
CHART_BAR = 'Bar',
CHART_BASE = 'Base',
CHART_BIDIRECTIONAL_BAR = 'BidirectionalBar',
CHART_BOX = 'Box',
CHART_BULLET = 'Bullet',
CHART_CIRCLE_PACKING = 'CirclePacking',
CHART_COLUMN = 'Column',
CHART_DUAL_AXES = 'DualAxes',
CHART_FUNNEL = 'Funnel',
CHART_GAUGE = 'Gauge',
CHART_HEATMAP = 'Heatmap',
CHART_HISTOGRAM = 'Histogram',
CHART_LINE = 'Line',
CHART_LIQUID = 'Liquid',
CHART_MIX = 'Mix',
CHART_PIE = 'Pie',
CHART_RADAR = 'Radar',
CHART_RADIAL_BAR = 'RadialBar',
CHART_ROSE = 'Rose',
CHART_SANKEY = 'Sankey',
CHART_SCATTER = 'Scatter',
CHART_STOCK = 'Stock',
CHART_SUNBURST = 'Sunburst',
CHART_TINY_AREA = 'TinyArea',
CHART_TINY_COLUMN = 'TinyColumn',
CHART_TINY_LINE = 'TinyLine',
CHART_TINY_PROGRESS = 'TinyProgress',
CHART_TINY_RING = 'TinyRing',
CHART_TREEMAP = 'Treemap',
CHART_VENN = 'Venn',
CHART_VIOLIN = 'Violin',
CHART_WATERFALL = 'Waterfall',
CHART_WORD_CLOUD = 'WordCloud';
/**
* Create a chart
*
* @param string $component Console::CHART_*
* @return ConsoleChart
*
* @see https://charts.ant.design/en/docs/api
*/
public static function chart(string $component): ConsoleChart
{
++self::$index;
return new ConsoleChart(self::$index, $component);
}
}