timwis / vizwit

An interactive data visualization tool
http://vizwit.io
GNU General Public License v2.0
100 stars 35 forks source link

DateTime self-filtered area doesn't align with initial data #231

Open timwis opened 6 years ago

timwis commented 6 years ago

When you select a range in a datetime, the filtered area should align exactly to your selection. Currently it's a bit off.

screen shot 2018-04-26 at 7 35 03 am

We could use a <clipPath>, but that doesn't solve the fact that part of the filtered data is "missing" (top right of image)

EDIT: Ah -- the initial query does date_trunc('month', dispatch_date), which groups all 31 days in january under one january bucket. The filtered query does where dispatch_date <= jan 1st, which is only one day in january. Vizwit v1 appears to trigger by the last day of the month. So when you select january in the datetime chart, it should trigger a filter to january 31st. But what if the chart isn't grouped by month, and grouped by day or year instead? Perhaps if we change it to < the next item on the scale. (ie. < feb 1st)