Closed ajduke closed 3 years ago
@timqian Just wondering if you get chance to see this PR?
@ajduke Thabks for the PR. And sorry for the late reply. I was doing some other stuff recently and haven't spent much time on this project recently. I will put more time on this repo after next week.
About this PR, after a quick look at the change. I failed to tell if this is the best way or not. I will review it again soon
Using object.assign
to define default values seems a better way: https://github.com/nfriedly/express-rate-limit/blob/master/lib/express-rate-limit.js#L5
Using
object.assign
to define default values seems a better way: https://github.com/nfriedly/express-rate-limit/blob/master/lib/express-rate-limit.js#L5
https://github.com/timqian/chart.xkcd/pull/47/files#diff-fbc43a77b4e8fe64398aa79145272a6bR151-R152
Is that comment for the above code? instead of function for checking empty array, use Object.assign
. Is my understanding correct?
Hi @ajduke I fixed this issue on https://github.com/timqian/chart.xkcd/commit/cef9ba26d5e27fb75ae028c536dabd3a4d143489#diff-fbc43a77b4e8fe64398aa79145272a6bR33
By using Object Spread
( the Object.assign
in es6).
Related issue
Fix #42
Due to
options
wasn't passed inLine
object, it was gettingoptions.dataColors
as the[ ]
empty due to which it wasn't getting any colors to plotScreenshot before and after this change I was using
index.html
charts example to test things out, so i had used the emptyoptions
forLine
chart to replicatebefore
after