File tree Expand file tree Collapse file tree 3 files changed +81
-9
lines changed Expand file tree Collapse file tree 3 files changed +81
-9
lines changed Original file line number Diff line number Diff line change @@ -149,12 +149,74 @@ rect.legend-mouseover-inactive,
149
149
}
150
150
151
151
.apexcharts-tooltip-marker {
152
- width : 12px ;
153
- height : 12px ;
152
+ display : inline-block;
154
153
position : relative;
155
- top : 0 ;
156
- margin-right : 10px ;
157
- border-radius : 50%
154
+ width : 16px ;
155
+ height : 16px ;
156
+ font-size : 16px ;
157
+ line-height : 16px ;
158
+ margin-right : 4px ;
159
+ text-align : center;
160
+ vertical-align : middle;
161
+ color : inherit;
162
+ }
163
+
164
+ .apexcharts-tooltip-marker ::before {
165
+ content : "" ;
166
+ display : inline-block;
167
+ width : 100% ;
168
+ text-align : center;
169
+ color : currentcolor;
170
+ text-rendering : optimizeLegibility;
171
+ -webkit-font-smoothing : antialiased;
172
+ font-size : 26px ;
173
+ line-height : 14px ;
174
+ font-weight : 900 ;
175
+ }
176
+
177
+ .apexcharts-tooltip-marker [shape = "circle" ]::before {
178
+ content : "\25CF" ;
179
+ }
180
+
181
+ .apexcharts-tooltip-marker [shape = "square" ]::before ,
182
+ .apexcharts-tooltip-marker [shape = "rect" ]::before {
183
+ content : "\25A0" ;
184
+ transform : translate (-1px , -2px );
185
+ }
186
+
187
+ .apexcharts-tooltip-marker [shape = "line" ]::before {
188
+ content : "\2500" ;
189
+ }
190
+
191
+ .apexcharts-tooltip-marker [shape = "diamond" ]::before {
192
+ content : "\25C6" ;
193
+ font-size : 28px ;
194
+ }
195
+
196
+ .apexcharts-tooltip-marker [shape = "triangle" ]::before {
197
+ content : "\25B2" ;
198
+ font-size : 22px ;
199
+ }
200
+
201
+ .apexcharts-tooltip-marker [shape = "cross" ]::before {
202
+ content : "\2715" ;
203
+ font-size : 18px ;
204
+ }
205
+
206
+ .apexcharts-tooltip-marker [shape = "plus" ]::before {
207
+ content : "\2715" ;
208
+ transform : rotate (45deg ) translate (-1px , -1px );
209
+ font-size : 18px ;
210
+ }
211
+
212
+ .apexcharts-tooltip-marker [shape = "star" ]::before {
213
+ content : "\2605" ;
214
+ font-size : 18px ;
215
+ }
216
+
217
+ .apexcharts-tooltip-marker [shape = "sparkle" ]::before {
218
+ content : "\2726" ;
219
+ font-size : 20px ;
158
220
}
159
221
160
222
.apexcharts-tooltip-series-group {
Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ export default class Labels {
268
268
ttItemsChildren = ttItems [ t ] . children
269
269
270
270
if ( w . config . tooltip . fillSeriesColor ) {
271
- ttItems [ t ] . style . backgroundColor = pColor
271
+ ttItems [ t ] . style . color = pColor
272
272
ttItemsChildren [ 0 ] . style . display = 'none'
273
273
}
274
274
@@ -309,7 +309,7 @@ export default class Labels {
309
309
pColor = w . config . tooltip . marker . fillColors [ t ]
310
310
}
311
311
312
- ttItemsChildren [ 0 ] . style . backgroundColor = pColor
312
+ ttItemsChildren [ 0 ] . style . color = pColor
313
313
}
314
314
315
315
if ( ! w . config . tooltip . marker . show ) {
@@ -325,7 +325,7 @@ export default class Labels {
325
325
326
326
if ( goalVals . length && w . globals . seriesGoals [ t ] ) {
327
327
const createGoalsHtml = ( ) => {
328
- let gLabels = '<div >'
328
+ let gLabels = '<div>'
329
329
let gVals = '<div>'
330
330
goalVals . forEach ( ( goal , gi ) => {
331
331
gLabels += ` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${ goal . attrs . strokeColor } ; height: 3px; border-radius: 0; top: 5px;"></span> ${ goal . attrs . name } </div>`
Original file line number Diff line number Diff line change @@ -147,7 +147,17 @@ export default class Tooltip {
147
147
148
148
let point = document . createElement ( 'span' )
149
149
point . classList . add ( 'apexcharts-tooltip-marker' )
150
- point . style . backgroundColor = w . globals . colors [ i ]
150
+ point . style . color = w . globals . colors [ i ]
151
+
152
+ console . log ( w . globals . colors )
153
+
154
+ let mShape = w . config . markers . shape
155
+ let shape = mShape
156
+ if ( Array . isArray ( mShape ) ) {
157
+ shape = mShape [ i ]
158
+ }
159
+
160
+ point . setAttribute ( 'shape' , shape )
151
161
gTxt . appendChild ( point )
152
162
153
163
const gYZ = document . createElement ( 'div' )
You can’t perform that action at this time.
0 commit comments