redsift / d3-rs-lines

Line chart plugin for D3.js version 4. Supports stacks, area fills, hovers and highlights.
MIT License
2 stars 1 forks source link

UTC and local time are fighting against each other in the multi layout #6

Open randalpinto opened 7 years ago

randalpinto commented 7 years ago

this.chart = lines().legend(['pass', 'fail']).fill([PASS_FILL, FAIL_FILL]).labelTime('multi').curve('curveStep').stacked(true);

Chart showing 12AM instead of the day.

Data sample: https://bricks.redsift.cloud/reusable/d3-rs-lines?scale=2&width=500&height=300&curve=curveStep&fillArea=true&labelTime=multi&fill=%2356d58e&fill=%23E06363&legend=pass&legend=fail&stacked=true&_datum=%5B%7B%22l%22%3A1490054400000%2C%22v%22%3A%5B242%2C1%5D%7D%2C%7B%22l%22%3A1490140800000%2C%22v%22%3A%5B180%2C0%5D%7D%2C%7B%22l%22%3A1490227200000%2C%22v%22%3A%5B213%2C0%5D%7D%2C%7B%22l%22%3A1490313600000%2C%22v%22%3A%5B135%2C0%5D%7D%2C%7B%22l%22%3A1490400000000%2C%22v%22%3A%5B60%2C0%5D%7D%2C%7B%22l%22%3A1490486400000%2C%22v%22%3A%5B44%2C0%5D%7D%2C%7B%22l%22%3A1490572800000%2C%22v%22%3A%5B251%2C0%5D%7D%2C%7B%22l%22%3A1490659200000%2C%22v%22%3A%5B183%2C0%5D%7D%2C%7B%22l%22%3A1490745600000%2C%22v%22%3A%5B208%2C0%5D%7D%2C%7B%22l%22%3A1490832000000%2C%22v%22%3A%5B0%2C0%5D%7D%5D

rahulpowar commented 7 years ago

Should be fixed with multi-local in v 0.3.4

randalpinto commented 7 years ago

Confirmed fixed.

randalpinto commented 7 years ago

Actually, X axis is fine but tooltips are now misaligned.

rahulpowar commented 7 years ago

Pushed a temp fix to align tooltips with 0.3.5, will refactor ahead of a v1.0 push