bpm.plotlyChart
Graphique Plotly (iframe ou placeholder). Démo : trafic du site — sessions par jour, semaine en cours vs semaine précédente.
Python
bpm.plotlyChart(data=[{"x": ["Lun","Mar","Mer"], "y": [3420,3680,3550], "type": "scatter", "name": "Semaine en cours"}])| Prop | Type | Défaut | Requis | Description |
|---|---|---|---|---|
data | object[] | — | Non | Tableau de traces Plotly (ex. [{type:'bar', x:[], y:[]}]). |
layout | object | — | Non | Config layout Plotly (title, xaxis, yaxis, etc.). |
config | object | — | Non | Config Plotly (responsive, displayModeBar, etc.). |
height | number | 380 | Non | Hauteur en pixels. |
width | number | string | 100% | Non | Largeur. |
iframeSrc | string | — | Non | URL iframe (compatibilité ascendante). |
className | string | — | Non | Classes 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://...")