@@ -56,8 +56,8 @@ def _bullet(df, markers, measures, ranges, subtitles, titles, orientation,
56
56
width_axis = 'xaxis'
57
57
length_axis = 'yaxis'
58
58
59
- for key in fig ['layout' ]. keys () :
60
- if 'axis ' in key :
59
+ for key in fig ['layout' ]:
60
+ if 'xaxis' in key or 'yaxis ' in key :
61
61
fig ['layout' ][key ]['showgrid' ] = False
62
62
fig ['layout' ][key ]['zeroline' ] = False
63
63
if length_axis in key :
@@ -100,7 +100,7 @@ def _bullet(df, markers, measures, ranges, subtitles, titles, orientation,
100
100
xaxis = 'x{}' .format (row + 1 ),
101
101
yaxis = 'y{}' .format (row + 1 )
102
102
)
103
- fig [ 'data' ]. append (bar )
103
+ fig . add_traces (bar )
104
104
105
105
# measures bars
106
106
for idx in range (len (df .iloc [row ]['measures' ])):
@@ -126,7 +126,7 @@ def _bullet(df, markers, measures, ranges, subtitles, titles, orientation,
126
126
xaxis = 'x{}' .format (row + 1 ),
127
127
yaxis = 'y{}' .format (row + 1 )
128
128
)
129
- fig [ 'data' ]. append (bar )
129
+ fig . add_traces (bar )
130
130
131
131
# markers
132
132
x = df .iloc [row ]['markers' ] if orientation == 'h' else [0.5 ]
@@ -141,7 +141,7 @@ def _bullet(df, markers, measures, ranges, subtitles, titles, orientation,
141
141
** scatter_options
142
142
)
143
143
144
- fig [ 'data' ]. append (markers )
144
+ fig . add_traces (markers )
145
145
146
146
# titles and subtitles
147
147
title = df .iloc [row ]['titles' ]
@@ -159,7 +159,7 @@ def _bullet(df, markers, measures, ranges, subtitles, titles, orientation,
159
159
True if orientation == 'h' else False ,
160
160
False
161
161
)
162
- fig ['layout' ]['annotations' ]. append (annot )
162
+ fig ['layout' ]['annotations' ] += (annot , )
163
163
164
164
return fig
165
165
0 commit comments