@@ -137,7 +137,6 @@ def from_json(cls, json_dict: dict):
137
137
lower_bound = json_dict .get (cls .CONST_LOWER_BOUND ),
138
138
upper_bound = json_dict .get (cls .CONST_UPPER_BOUND ),
139
139
)
140
-
141
140
else :
142
141
return None
143
142
@@ -157,12 +156,14 @@ def from_json(cls, json_dict: dict):
157
156
def add_to_figure (self , fig : Figure , xaxis : int , yaxis : int ):
158
157
xaxis_str , yaxis_str , x_str , y_str = self .get_x_y_str_axes (xaxis , yaxis )
159
158
if type (self .elements ) == list and len (self .elements ) > 0 :
160
- x_axis = [element .value for element in self .elements ]
161
- y_axis = [element .estimate for element in self .elements ]
162
- fig .add_bar (x = x_axis , y = y_axis , xaxis = x_str , yaxis = y_str , name = "" )
159
+ y_axis = [element .value for element in self .elements ]
160
+ x_axis = [element .estimate for element in self .elements ]
161
+ fig .add_bar (
162
+ x = x_axis , y = y_axis , xaxis = x_str , yaxis = y_str , name = "" , orientation = "h"
163
+ )
163
164
fig .layout .annotations [xaxis ].text = self .CONST_TOP_K_FREQUENT_TITLE
164
- fig .layout [yaxis_str ]["title" ] = "Count "
165
- fig .layout [xaxis_str ]["title" ] = "Element "
165
+ fig .layout [yaxis_str ]["title" ] = "Element "
166
+ fig .layout [xaxis_str ]["title" ] = "Count "
166
167
167
168
168
169
class FeatureStatistics :
0 commit comments