Composants → bpm.plotlyChart

bpm.plotlyChart

Graphique Plotly (iframe ou placeholder). Démo : trafic du site — sessions par jour, semaine en cours vs semaine précédente.

StableGraphiques⏱ 2 min
Python
bpm.plotlyChart(data=[{"x": ["Lun","Mar","Mer"], "y": [3420,3680,3550], "type": "scatter", "name": "Semaine en cours"}])
PropTypeDéfautRequisDescription
dataobject[]NonTableau de traces Plotly (ex. [{type:'bar', x:[], y:[]}]).
layoutobjectNonConfig layout Plotly (title, xaxis, yaxis, etc.).
configobjectNonConfig Plotly (responsive, displayModeBar, etc.).
heightnumber380NonHauteur en pixels.
widthnumber | string100%NonLargeur.
iframeSrcstringNonURL iframe (compatibilité ascendante).
classNamestringNonClasses CSS.

Exemples

bpm.plotlyChart(data=[{"x": ["Lun","Mar","Mer","Jeu","Ven"], "y": [3420,3680,3550,3890,4120], "type": "scatter", "name": "Sessions"}])
bpm.plotlyChart(data=traces, layout={"title": "Trafic du site — sessions par jour"}, height=400)
bpm.plotlyChart(data=[{"x": ["Sam","Dim"], "y": [2150,1840], "type": "bar", "name": "Week-end"}])
bpm.plotlyChart(iframeSrc="https://...")