Y
Y
You can just Eugene2018-06-27 18:42:27
JavaScript
You can just Eugene, 2018-06-27 18:42:27

How to make a range-slider with a chart in javascript?

You need to do something like this (diagram + range-slider):
5b33af4414191047550335.png
So far it turned out like this:
5b33af88a63fc490826505.png
For range-slider I use noUiSlider , but for the diagram I can’t find it so that it would work in pairs, while what is not in the range has become " disabled" as in the first picture.
Help pls..

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
profesor08, 2018-06-27
@profesor08

Arrange the chart elements. Knowing their number, width and width of the container. Calculate, based on the position of the dots, which ones to paint over, which ones not. For example, divide the width of the container by the number of stripes, so you get the distance in pixels that you need to drag a point to paint the strip. By dividing the distance traveled by the point by the width of the strip, you get the number of stripes that need to be painted over.

M
Maxim Timofeev, 2018-06-27
@webinar

take a js library that builds graphs
get json data
build a graph
change the fill using the api of the selected library

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question