make grid simplify subplots (mixed plots not working currently)
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
Usecase:
User should be able to draw subplots with ease by using grid option.
User has 4 diff graphs and he wants to put them together, in grid by using following option without getting into much complexity
grid: {
rows: 2,
columns: 2,
pattern: "independent"
}
}
Ease of use:
It will be great to have similat functionality like provided in python plotly where user can define rows, columns, colspan and rowspan in data. Its plain and dead easy.
from plotly.subplots import make_subplots
import plotly.graph_objects as go
fig = make_subplots(
rows=5, cols=2,
specs=[[{}, {"rowspan": 2}],
[{}, None],
[{"rowspan": 2, "colspan": 2}, None],
[None, None],
[{}, {}]],
print_grid=True)
Reference:
python plotly.subplots has given functionality with much ease of use. see HERE. Same is needed for js Please
Code Pen:
https://codepen.io/mafar/pen/YzZEdLR?editors=0010
JS CODE:
var trace1 = {
type: "bar",
y: [2, 3, 1]
};
var trace2 = {
r: [2, 3, 1],
theta: [0, 45, 90],
type: "barpolar"
};
var trace3 = {
type: "pie",
values: [2, 3, 1]
};
var trace4 = {
mode: "lines",
type: "scatter3d",
x: [2, 3, 1],
y: [0, 0, 0],
z: [0.5, 1, 2]
};
var data = [trace1, trace2, trace3, trace4];
var layout = {
grid: {
rows: 2,
columns: 2,
pattern: "independent"
}
};
Plotly.newPlot("myDiv", data, layout);
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo l'esempio misto con bar, barpolar, pie e scatter3d tramite Plotly.newPlot e confrontalo con il CodePen collegato. Leggi il comportamento esistente del layout a griglia e il riferimento ai subplot di Python Plotly, quindi definisci cosa richiederebbe il supporto per rows, columns, grafici misti indipendenti, colspan e rowspan; il lavoro è completato quando l'esempio funziona senza configurazione manuale dei subplot.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- data-visualization
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100