Commit 0cc49cc
Pass customdata to custom marker functions (backward compatible) (#2)
* Initial plan
* Add data point and trace context to custom marker functions
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
* Improve comment clarity for custom marker function parameters
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
* Add weather map demo and documentation for custom marker functions
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
* Add backward compatibility test demo
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
* Remove dist folder changes - these are build artifacts for maintainers
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>
* Fix coercion to allow function values for marker.symbol
Allow functions to pass through enumerated coercion for custom marker symbols.
Update weather map demo with proper meteorological wind barbs.
* Auto-rotate custom marker functions via align()
- Export align() from symbol_defs.js
- Apply align() automatically to custom function results in makePointPath()
- Simplify custom function signature to (r, d, trace)
- Update weather demo with cleaner wind barbs and compact layout
* Simplify custom marker function signature to (r, customdata)
- Custom functions now receive (r, customdata) instead of (r, d, trace)
- customdata is the value from trace.customdata[i] for each point
- Rotation and standoff handled automatically via align()
- Updated demos to use new signature
* Improve weather demo with jet stream wind pattern
* Add UTF-8 icons to weather demo legend
* Rename pt back to d to match call sites
* Remove unused trace parameter from makePointPath
* Update docs and tests for (r, customdata) signature
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gatopeich <7722268+gatopeich@users.noreply.github.com>1 parent db38309 commit 0cc49cc
File tree
7 files changed
+408
-127
lines changed- devtools/demos
- src
- components/drawing
- lib
- test/jasmine/tests
7 files changed
+408
-127
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 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 | + | |
10 | 43 | | |
11 | 44 | | |
12 | 45 | | |
13 | 46 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
19 | 50 | | |
20 | 51 | | |
21 | 52 | | |
22 | 53 | | |
23 | 54 | | |
24 | 55 | | |
25 | | - | |
26 | 56 | | |
27 | 57 | | |
28 | 58 | | |
29 | 59 | | |
30 | 60 | | |
31 | 61 | | |
32 | | - | |
| 62 | + | |
33 | 63 | | |
34 | 64 | | |
35 | 65 | | |
| |||
38 | 68 | | |
39 | 69 | | |
40 | 70 | | |
41 | | - | |
42 | | - | |
43 | 71 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 72 | + | |
53 | 73 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
61 | 78 | | |
62 | | - | |
63 | | - | |
| 79 | + | |
64 | 80 | | |
65 | 81 | | |
66 | 82 | | |
67 | | - | |
68 | 83 | | |
69 | 84 | | |
70 | 85 | | |
71 | 86 | | |
72 | | - | |
| 87 | + | |
73 | 88 | | |
74 | | - | |
| 89 | + | |
75 | 90 | | |
76 | 91 | | |
77 | 92 | | |
78 | 93 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 94 | + | |
82 | 95 | | |
83 | 96 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 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 | + | |
87 | 125 | | |
88 | 126 | | |
89 | 127 | | |
90 | 128 | | |
91 | | - | |
92 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
93 | 136 | | |
94 | 137 | | |
95 | | - | |
96 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
97 | 141 | | |
98 | 142 | | |
99 | 143 | | |
100 | 144 | | |
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 | 145 | | |
130 | 146 | | |
131 | | - | |
| 147 | + | |
132 | 148 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 149 | + | |
| 150 | + | |
137 | 151 | | |
138 | | - | |
139 | 152 | | |
140 | | - | |
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
144 | 156 | | |
145 | 157 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | 158 | | |
186 | 159 | | |
187 | 160 | | |
188 | 161 | | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
| 162 | + | |
| 163 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments