Xây dựng Dashboard với Dash và Plotly
Alex Scriven
Data Scientist
$$
$$
Ưu điểm:
plotly.express$$
$$
$$
$$
$$

import plotly.express as pxline_graph = px.line(data_frame=ecom_sales, x='Year-Month', y='Total Sales ($)', title='Total Sales by Month')line_graph.show()

$$
bar_fig = px.bar( data_frame=ecom_sales, x='Total Sales ($)', y='Country', title='Total Sales by Country',orientation='h')bar_fig.show()

Thay đổi độ rộng cột của biểu đồ cột:
bar_fig.update_layout({'bargap': 0.5})bar_fig.show()
$$
$$
$$
Xem thêm tài liệu Plotly

Xây dựng Dashboard với Dash và Plotly