File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 3
3
from pyecharts .chart import Chart
4
4
5
5
6
+ DEFAULT_GAUGE_TOOLTIP_FORMATTER = "{a} <br/>{b} : {c}%"
7
+
8
+
6
9
class Gauge (Chart ):
7
10
"""
8
11
<<< 仪表盘 >>>
@@ -33,7 +36,7 @@ def __add(
33
36
"""
34
37
kwargs .update (type = "gauge" )
35
38
if "tooltip_formatter" not in kwargs :
36
- kwargs ["tooltip_formatter" ] = "{a} <br/>{b} : {c}%"
39
+ kwargs ["tooltip_formatter" ] = DEFAULT_GAUGE_TOOLTIP_FORMATTER
37
40
_min , _max = 0 , 100
38
41
if scale_range :
39
42
if len (scale_range ) == 2 :
Original file line number Diff line number Diff line change 4
4
from pyecharts .datasets .coordinates import get_coordinate
5
5
6
6
7
+ DEFAULT_GEO_TOOLTIP_FORMATTER = "{b}: {c}"
8
+
9
+
7
10
class Geo (Chart ):
8
11
"""
9
12
<<< 地理坐标系 >>>
@@ -93,7 +96,7 @@ def __add(
93
96
assert len (attr ) == len (value )
94
97
kwargs .update (type = "geo" )
95
98
if "tooltip_formatter" not in kwargs :
96
- kwargs ["tooltip_formatter" ] = "{b}: {c}"
99
+ kwargs ["tooltip_formatter" ] = DEFAULT_GEO_TOOLTIP_FORMATTER
97
100
chart = self ._get_all_options (** kwargs )
98
101
99
102
if geo_cities_coords :
You can’t perform that action at this time.
0 commit comments