Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_x_values_labels(df, encoding):
if encoding.y is None:
series = df.groupby([encoding.x]).size()
values = series.values.tolist()
labels = series.index.tolist()
else:
labels, values = GraphBase._get_x_y_values(df, encoding)
return values, labels
def _get_data(self, df, encoding):
x_values, y_values = GraphBase._get_x_y_values(df, encoding)
return [Scatter(x=x_values, y=y_values)]
def _get_data(self, df, encoding):
x_values, y_values = GraphBase._get_x_y_values(df, encoding)
return [Bar(x=x_values, y=y_values)]
def _get_data(self, df, encoding):
x_values, y_values = GraphBase._get_x_y_values(df, encoding)
return [Scatter(x=x_values, y=y_values, fill="tonexty")]
def _get_data(self, df, encoding):
x_values, y_values = GraphBase._get_x_y_values(df, encoding)
return [Scatter(x=x_values, y=y_values, mode='markers')]