allow provision of X coordinates only for Sankey charts
Đang mở
Chưa có ai nhận issue này.
feature
P3
- Ngôn ngữ chính
- Python
- Star
- 18.8k
- Fork
- 2.8k
- Merge trung bình
- 16 giờ 26 phút
- Pull request đã merge (30 ngày)
- 21
Mô tả
This is somewhat of a duplicate of #960 and #1437 but slightly more hopeful :)
The x and y arguments of the nodes dict do successfully control node location, however -- it appears that both arguments must be supplied.
import dash
import dash_core_components as dcc
import dash_html_components as html
f#rom dash.dependencies import Output, Input, State
import plotly.graph_objs as go
#import pandas as pd
app = dash.Dash()
app.layout = html.Div([
dcc.Graph(
id = 'wut',
figure={
'data' : [
dict(
type='sankey',
#domain =
arrangement = 'fixed',
node = dict(
pad = 15,
thickness = 20,
line = dict(color = "black", width = 0.5),
label = ["A1", "A2", "B1", "B2", "C1", "C2"],
x = [0.1, 0.2, 0.24, 0.7, 0.8, .9],
y = [0, .2, .3, .4, .5, .6],
color = "blue"
),
link = dict(
source = [0, 1, 0, 2, 3, 3], # indices correspond to labels, eg A1, A2, A2, B1, ...
target = [2, 3, 3, 4, 4, 5],
value = [8, 4, 2, 8, 4, 2]
))
]}
)])
if __name__ == '__main__':
app.run_server(debug=True)
VS.
import dash
import dash_core_components as dcc
import dash_html_components as html
f#rom dash.dependencies import Output, Input, State
import plotly.graph_objs as go
#import pandas as pd
app = dash.Dash()
app.layout = html.Div([
dcc.Graph(
id = 'wut',
figure={
'data' : [
dict(
type='sankey',
#domain =
arrangement = 'fixed',
node = dict(
pad = 15,
thickness = 20,
line = dict(color = "black", width = 0.5),
label = ["A1", "A2", "B1", "B2", "C1", "C2"],
###x = [0.1, 0.2, 0.24, 0.7, 0.8, .9],
y = [0, .2, .3, .4, .5, .6],
color = "blue"
),
link = dict(
source = [0, 1, 0, 2, 3, 3], # indices correspond to labels, eg A1, A2, A2, B1, ...
target = [2, 3, 3, 4, 4, 5],
value = [8, 4, 2, 8, 4, 2]
))
]}
)])
if __name__ == '__main__':
app.run_server(debug=True)
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp hoặc test nào được nêu tên. Hãy tái hiện hai ví dụ Sankey từ Issue, sau đó lần theo nơi tọa độ của các nút Sankey được xử lý để xác định tại sao hiện tại x lại yêu cầu y. Công việc được coi là hoàn tất khi biểu đồ Sankey có arrangement được đặt thành fixed chấp nhận tọa độ x mà không có y và giữ nguyên hành vi được ghi trong tài liệu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- data-visualization
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100