Skip to content
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

Cannot read property 'splice' of undefined #17

Open
ffixitt opened this issue Jun 27, 2018 · 3 comments
Open

Cannot read property 'splice' of undefined #17

ffixitt opened this issue Jun 27, 2018 · 3 comments

Comments

@ffixitt
Copy link

ffixitt commented Jun 27, 2018

Something is wrong ....

@spmsh
Copy link

spmsh commented Sep 11, 2018

I got the same error with the minimal version.
Switching to the RangerSlider-all.min.js seems to fix the problem.

I believe it has to do with jQuery version. The one I'm using when I get the error is v3.3.1 as opposed to the "All" version that includes jQuery v2.1.3

Hope this helps.

@jacekpietrzyk1
Copy link

jacekpietrzyk1 commented Jul 10, 2019

I have the same error in the console. No matter which version (3.31 or 2.1.3) of jQuery is included. Any help, please?

Edit:
problem solved by copying this specific js files from the header section of the fiddle example:

<script type="text/javascript" src="https://gitcdn.link/cdn/schme16/Chart.js-RangeSlider/2dc49a0980ca04ca2690bc5f1c9e3644e4207b5a/dist/RangeSlider-all.min.js"></script> <script type="text/javascript" src="https://gitcdn.link/cdn/schme16/Chart.js-RangeSlider/2dc49a0980ca04ca2690bc5f1c9e3644e4207b5a/dist/RangeSlider-all.minjs"></script>

@biiim
Copy link

biiim commented Apr 23, 2020

Just downloaded the package as is and had to modify 2 things in RangeSlider-all.min.js on line 18617 to get the test-1.html chart to open:

nD.pointBackgroundColor=nD.pointBackgroundColor.splice(min,max-min||1)
to
nD.pointBackgroundColor=nD.pointBackgroundColor
and
nD.pointBorderColor=nD.pointBorderColor.splice(min,max-min||1)
to
nD.pointBorderColor=nD.pointBorderColor

Error in the console(Chrome 81) is : Uncaught TypeError: Cannot read property 'splice' of undefined at Object._getData (RangeSlider-all.min.js:18617) at Object._create (RangeSlider-all.min.js:18617) at new RangeSliderChart (RangeSlider-all.min.js:18617) at test-1.html:133

Chart loads find after making the 2 changes, just possibly missing colour as I likely just removed the 2 properties being passed correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants