Altair Scrollable -DiagrammPython

Python-Programme
Anonymous
 Altair Scrollable -Diagramm

Post by Anonymous »

Ich versuche, Daten für jeden Tag zu zeichnen. Abhängig von der Auswahl der Daten kann es einige Tage oder mehrere Monate dauern. In beiden Fällen möchte ich die gleiche Skala (1 bar pro Tag) < /p>
Ich kann die Daten pro Tag ohne Problem zeichnen. Das Diagramm ist auch scrollbar, aber wenn ich mehrere Monate ausgewählt habe, zeigt es immer noch 30 Tage. Wenn ich nach links /rechts scrolle, gibt es keine Daten.
Was fehlt mir? < /P>

Code: Select all

timeunit='date'
a = alt.Chart(data).mark_bar(opacity=0.6).encode(
x=alt.X('date(Gemeldet_Am):T',
timeUnit=timeunit,
axis=alt.Axis(title='Zeitfenster', grid=False)),
y=alt.Y('count(ABC):Q',
axis=alt.Axis(title='Number of calls',grid=True)),color='mean(Sentiment):Q',
tooltip=[alt.Tooltip('count(ABC):Q'),
alt.Tooltip('mean(Sentiment):Q',title='Sentiment')]).interactive()

b = alt.Chart(data).mark_line(color='orange', interpolate='monotone').encode(
x=alt.X('date(Gemeldet_Am):T',
timeUnit=timeunit),
y='mean(Sentiment):Q').interactive()

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post