Код: Выделить всё
import pandas as pd
import plotly.graph_objects as go
from dash import Dash, html, dcc
# Load data from CSV
csv_file = 'prices.csv'
df = pd.read_csv(csv_file)
# Create the Dash app
app = Dash(__name__)
# Define the layout of the app
app.layout = html.Div(
[
dcc.Graph(
figure=go.Figure(
data=[go.Bar(y=df['price'], x=df['list'], orientation='h')],
layout={
'height': 2500 # Adjust height to control scrollbar visibility
}
)
),
],
style={
'overflow-y': 'auto',
'height': 800 # Set a fixed height for the scrollable area
}
)
if __name__ == '__main__':
app.run(debug=True)
В конце я хочу достичь такого графика, как ниже ( Изучение: Random Image strong
Подробнее здесь: https://stackoverflow.com/questions/796 ... r-method-t
Мобильная версия