Closed araichev closed 11 years ago
So, after rearranging the Vega spec a bunch of different ways, I can't figure out how to make a time scale play nice with bars in the same way that it does with lines or scatterplots. If it works at all, it will be something in the Marks piece of the spec.
Honestly, if you need a bar plot on a time scale, I would use Bearcart. Just a few lines of code:
import bearcart
html_path = r'index.html'
data_path = r'data.json'
js_path = 'rickshaw.min.js'
css_path = 'rickshaw.min.css'
vis = bearcart.Chart(series, plt_type='bar')
vis.create_chart(html_path=html_path, data_path=data_path,
js_path=js_path, css_path=css_path)
Bearcart will do some cool bar chart stuff: http://bl.ocks.org/wrobstory/5560560
I tried and came to the same conclusion. Seems like it's really a Vega bug, since one of the goals of a visualization grammar should be to keep scales and marks independent of each other.
I submitted an issue: https://github.com/trifacta/vega/issues/62
I'm trying to plot a Pandas timeseries as a bar chart via the code below, but it produces a blank html screen. No plot, no axes, no nothing. Am i doing something wrong?
If i change
vincent.Bar()
tovincent.Line()
below, then i get a correct line plot as expected.