forked from academiadocodigo/TBGWebCharts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Charts.Types.pas
57 lines (52 loc) · 1.54 KB
/
Charts.Types.pas
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
unit Charts.Types;
interface
uses
TypInfo;
type
TTypeContainer = (_container, fluid, lg, md, sm, xl);
TTyperContainerHelper = record helper for TTYpeContainer
function ToString : String;
end;
type
TTypeChart = (line, bar, radar, pie, doughnut, polarArea, bubble, scatter, horizontalBar);
TTypeChartHelper = record helper for TTypeChart
function ToString : String;
end;
type
TTypeMaps = (GMaps);
type
TTypeMapStyle = (Hybrid, RoadMap, Satellite, Terrain);
TTypeMapsStyleHelper = record helper for TTypeMapStyle
function ToString : string;
end;
type
TTypeMapTravelMode = (Bicycling, Driving, Transit, Walking);
TTypeMapTravelModeHelper = record helper for TTypeMapTravelMode
function ToString : string;
end;
type
TTypeCardStyled = (CardStyledIconRight, CardStyledIconLeft, CardStyledIconBackground);
implementation
uses
System.SysUtils;
{ TTypeChartHelper }
function TTypeChartHelper.ToString: String;
begin
Result := GetEnumName(TypeInfo(TTypeChart), Integer(Self));
end;
{ TTyperContainerHelper }
function TTyperContainerHelper.ToString: String;
begin
Result := GetEnumName(TypeInfo(TTypeContainer), Integer(Self));
end;
{ TTypeMapsStyleHelper }
function TTypeMapsStyleHelper.ToString: string;
begin
Result := lowerCase(GetEnumName(TypeInfo(TTypeMapStyle), Integer(Self)));
end;
{ TTypeMapTravelModeHelper }
function TTypeMapTravelModeHelper.ToString: string;
begin
Result := upperCase(GetEnumName(TypeInfo(TTypeMapTravelMode), Integer(Self)));
end;
end.