Verbosity
The VegaFusionWidget
provides a verbose
flag that can be used to enable verbose logging of the messages sent between the server and client. When set, log messages are written to the browser’s JavaScript console.
Here is an example of enabling verbose logging for the interactive average example.
import altair as alt
from vega_datasets import data
import vegafusion as vf
source = data.seattle_weather()
brush = alt.selection(type='interval', encodings=['x'])
bars = alt.Chart().mark_bar().encode(
x='month(date):O',
y='mean(precipitation):Q',
opacity=alt.condition(brush, alt.OpacityValue(1), alt.OpacityValue(0.7)),
).add_selection(
brush
)
line = alt.Chart().mark_rule(color='firebrick').encode(
y='mean(precipitation):Q',
size=alt.SizeValue(3)
).transform_filter(
brush
)
chart = alt.layer(bars, line, data=source)
widget = vf.jupyter.VegaFusionWidget(chart, verbose=True)
widget
Now open the browser’s JavaScript console and then click and drag on the chart to create a selection. Messages containing the selection region and average value will be written to the console.