-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaxis3D.tcl
More file actions
152 lines (127 loc) · 9.99 KB
/
Copy pathaxis3D.tcl
File metadata and controls
152 lines (127 loc) · 9.99 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Copyright (c) 2022-2025 Nicolas ROBERT.
# Distributed under MIT license. Please see LICENSE for details.
#
namespace eval ticklecharts {}
proc ticklecharts::xAxis3D {value} {
if {[llength $value] % 2} ticklecharts::errorEvenArgs
setdef options -show -minversion 5 -validvalue {} -type bool|null -default "True"
setdef options -name -minversion 5 -validvalue {} -type str|null -default "X"
setdef options -grid3DIndex -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -nameTextStyle -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::nameTextStyle3D $value]
setdef options -nameGap -minversion 5 -validvalue {} -type num|null -default 20
setdef options -type -minversion 5 -validvalue formatType -type str|null -default "value"
setdef options -min -minversion 5 -validvalue formatMin -type num|str|null -default "nothing"
setdef options -max -minversion 5 -validvalue formatMax -type num|str|null -default "nothing"
setdef options -scale -minversion 5 -validvalue {} -type bool|null -default "False"
setdef options -splitNumber -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -minInterval -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -interval -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -logBase -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -data -minversion 5 -validvalue {} -type list.d|null -default "nothing"
setdef options -axisLine -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisLine3D $value]
setdef options -axisLabel -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisLabel3D $value]
setdef options -axisTick -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisTick3D $value]
setdef options -splitLine -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::splitLine3D $value]
setdef options -splitArea -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::splitArea3D $value]
setdef options -axisPointer -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisPointer3D $value]
#...
# Both properties item are accepted.
# -dataXAxis3DItem
# -dataItem
set itemKey [ticklecharts::itemKey {-dataXAxis3DItem -dataItem} $value]
if {[dict exists $value $itemKey]} {
if {[dict exists $value -data]} {
error "'chart3D' object cannot contains '-data' and '$itemKey'... for\
'[ticklecharts::getLevelProperties [info level]]'"
}
setdef options -data -minversion 5 -validvalue {} -type list.o -trace no -default [ticklecharts::axis3DItem $value $itemKey]
}
# remove key(s)...
set value [dict remove $value -axisLine -axisTick \
-axisLabel -splitLine -axisPointer \
-splitArea -nameTextStyle $itemKey]
set options [merge $options $value]
return $options
}
proc ticklecharts::yAxis3D {value} {
if {[llength $value] % 2} ticklecharts::errorEvenArgs
setdef options -show -minversion 5 -validvalue {} -type bool|null -default "True"
setdef options -name -minversion 5 -validvalue {} -type str|null -default "Y"
setdef options -grid3DIndex -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -nameTextStyle -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::nameTextStyle3D $value]
setdef options -nameGap -minversion 5 -validvalue {} -type num|null -default 20
setdef options -type -minversion 5 -validvalue formatType -type str|null -default "value"
setdef options -min -minversion 5 -validvalue formatMin -type num|str|null -default "nothing"
setdef options -max -minversion 5 -validvalue formatMax -type num|str|null -default "nothing"
setdef options -scale -minversion 5 -validvalue {} -type bool|null -default "False"
setdef options -splitNumber -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -minInterval -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -interval -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -logBase -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -data -minversion 5 -validvalue {} -type list.d|null -default "nothing"
setdef options -axisLine -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisLine3D $value]
setdef options -axisLabel -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisLabel3D $value]
setdef options -axisTick -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisTick3D $value]
setdef options -splitLine -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::splitLine3D $value]
setdef options -splitArea -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::splitArea3D $value]
setdef options -axisPointer -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisPointer3D $value]
#...
# Both properties item are accepted.
# -dataYAxis3DItem
# -dataItem
set itemKey [ticklecharts::itemKey {-dataYAxis3DItem -dataItem} $value]
if {[dict exists $value $itemKey]} {
if {[dict exists $value -data]} {
error "'chart3D' object cannot contains '-data' and '$itemKey'... for\
'[ticklecharts::getLevelProperties [info level]]'"
}
setdef options -data -minversion 5 -validvalue {} -type list.o -trace no -default [ticklecharts::axis3DItem $value $itemKey]
}
# remove key(s)...
set value [dict remove $value -axisLine -axisTick \
-axisLabel -splitLine -axisPointer \
-splitArea -nameTextStyle $itemKey]
set options [merge $options $value]
return $options
}
proc ticklecharts::zAxis3D {value} {
if {[llength $value] % 2} ticklecharts::errorEvenArgs
setdef options -show -minversion 5 -validvalue {} -type bool|null -default "True"
setdef options -name -minversion 5 -validvalue {} -type str|null -default "Z"
setdef options -grid3DIndex -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -nameTextStyle -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::nameTextStyle3D $value]
setdef options -nameGap -minversion 5 -validvalue {} -type num|null -default 20
setdef options -type -minversion 5 -validvalue formatType -type str|null -default "value"
setdef options -min -minversion 5 -validvalue formatMin -type num|str|null -default "nothing"
setdef options -max -minversion 5 -validvalue formatMax -type num|str|null -default "nothing"
setdef options -scale -minversion 5 -validvalue {} -type bool|null -default "False"
setdef options -splitNumber -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -minInterval -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -interval -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -logBase -minversion 5 -validvalue {} -type num|null -default "nothing"
setdef options -data -minversion 5 -validvalue {} -type list.d|null -default "nothing"
setdef options -axisLine -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisLine3D $value]
setdef options -axisLabel -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisLabel3D $value]
setdef options -axisTick -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisTick3D $value]
setdef options -splitLine -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::splitLine3D $value]
setdef options -splitArea -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::splitArea3D $value]
setdef options -axisPointer -minversion 5 -validvalue {} -type dict|null -default [ticklecharts::axisPointer3D $value]
#...
# Both properties item are accepted.
# -dataZAxis3DItem
# -dataItem
set itemKey [ticklecharts::itemKey {-dataZAxis3DItem -dataItem} $value]
if {[dict exists $value $itemKey]} {
if {[dict exists $value -data]} {
error "'chart3D' object cannot contains '-data' and '$itemKey'... for\
'[ticklecharts::getLevelProperties [info level]]'"
}
setdef options -data -minversion 5 -validvalue {} -type list.o -trace no -default [ticklecharts::axis3DItem $value $itemKey]
}
# remove key(s)...
set value [dict remove $value -axisLine -axisTick \
-axisLabel -splitLine -axisPointer \
-splitArea -nameTextStyle $itemKey]
set options [merge $options $value]
return $options
}