-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Year slider displays area in between steps #183
Comments
Can anyone help me out here? |
Hi @Abhi-ak. Sorry for not getting back to you sooner. You could try to use the Making SVGs responsive is a big topic. For this library you can see an example of dynamically changing the width at
|
Hi @johnwalley. Tried giving marks but now the issue is that I cannot select odd years. Marks: |
Do you an example somewhere I can test, for example on Codepen? I can't test this at the moment but I just wanted to check that you've tried setting |
I'm trying to create a year step slider in d3 (v5) with the years 2000 through 2021.
const slider = sliderBottom() .min(new Date(2000, 1, 1)) .max(new Date(2020, 1, 1)) .tickFormat(d3.timeFormat('%Y')) .tickValues(ar) .default(new Date(2000, 10, 3)) .width(rectWidth - margin.right - 65) .height(75) .on("onchange", (value) => { year = d3.timeFormat('%Y')(value); })
const g = d3 .select("#slider") .append('svg') .attr('width', rectWidth - margin.right - 65) .attr('height', 75) .append('g') .attr('transform', 'translate(20,20)')
The slider that is displayed however seems to enable the area in between the "steps" and the year also seems to move along.
@johnwalley
The text was updated successfully, but these errors were encountered: