altair-transform icon indicating copy to clipboard operation
altair-transform copied to clipboard

mark_errorbar silently fails

Open ValdarT opened this issue 5 years ago • 2 comments

import pandas as pd
import altair as alt
from altair_transform import transform_chart

df = pd.read_json('https://vega.github.io/vega-datasets/data/iris.json')

error_bars = alt.Chart(df).mark_errorbar(extent='ci').encode(
  x=alt.X('petalLength:Q', scale=alt.Scale(zero=False)),
  y=alt.Y('species:N')
)

transform_chart(error_bars)

The transformation does not take place but NotImplementedError is also not raised (which would be expected based on the Limitations section in the README).

ValdarT avatar Dec 19 '19 12:12 ValdarT

A general comment: I'd really like this and concatenated charts to be supported so that it would be easy to create charts like this on larger datasets with Altair: https://altair-viz.github.io/gallery/errorbars_with_ci.html

ValdarT avatar Dec 19 '19 12:12 ValdarT

Thanks – your chart contains no direct data transforms, so the code lets it pass through unmodified. There are transforms implied by mark_errorbar, but altair-transform does not yet recognize those.

Concatenated charts have not yet been implemented, because nobody has yet chosen to contribute that.

If you would like to contribute either of these features, please feel welcome, and let me know if you have questions about how to proceed.

jakevdp avatar Dec 19 '19 13:12 jakevdp