@@ -137,7 +137,6 @@ def from_json(cls, json_dict: dict):
137137 lower_bound = json_dict .get (cls .CONST_LOWER_BOUND ),
138138 upper_bound = json_dict .get (cls .CONST_UPPER_BOUND ),
139139 )
140-
141140 else :
142141 return None
143142
@@ -157,12 +156,14 @@ def from_json(cls, json_dict: dict):
157156 def add_to_figure (self , fig : Figure , xaxis : int , yaxis : int ):
158157 xaxis_str , yaxis_str , x_str , y_str = self .get_x_y_str_axes (xaxis , yaxis )
159158 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+ )
163164 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 "
166167
167168
168169class FeatureStatistics :
0 commit comments