]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
Fixed Issue with tooltip label display when given null data value (#3528)
authorJerry Chang <therealjerrycan@gmail.com>
Mon, 31 Oct 2016 00:34:06 +0000 (17:34 -0700)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sat, 19 Nov 2016 14:29:15 +0000 (09:29 -0500)
commit4fbb1bdbbcfc25addf74cd6da3315c0a5f187011
tree4e8044243ad9a1dbb0c2161c5ba0e7b2095b11a7
parent48cb8b78e73a8a305aa7a19957ce6dcddfd9a6cd
Fixed Issue with tooltip label display when given null data value (#3528)

When datasets.data contains a null value, the label displays incorrect
value.

code additions:
- unit tests for truthy label values (when data is null)
- checks to ensure handling of null value in getLabelByIndex method

added mock data sets from issue #3528 example

expect the return value from getLabelForIndex method to be valid (truthy)

added check for null of first data value in getLabelForIndex

fixed indentation and null comparison operator in code

fixed mistake in definition of firstData variable

changed testing for data on index 0 to using index variable

changed firstData to use value instead

condense the statments to use value variable
.gitignore
src/scales/scale.time.js
test/scale.time.tests.js