| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
What about ticks.source: 'auto', labels: '2015', '2016', data: '2015-01' .. '2015-12'. Labels are going to be first in array, months last. Another thing to consider is the way labels are implemented. Those might as well be intended for a category scale in a time/category chart. So we need the check if its object data or not. Then we could have a mixed set of datasets with object data and plain data. So would need to check if any of those datasets have plain data and add labels then. I'd maybe add a labelsAdded flag, for not adding them many times. Maybe another flag for objectData and sort only if both are set. There is also a bug (in master), we are not checking if dataset is any of current scales business. |
Sorry, something went wrong.
|
Thanks for the great review @kurkle. I've made the changes you suggested |
Sorry, something went wrong.
* Perf improvement for ticks.source:'labels' * Address review comments * Address review comments
| Back | FazBrowse Home | New Git URL |
We only need to add the labels to timestamps once - not once per dataset
We also don't need to call arrayUnique on the labels because duplicate labels aren't supported. If you pass duplicate labels and then we call arrayUnique then we end up with fewer labels than data points, so this code never worked. arrayUnique is quite expensive for large datasets, so it's very helpful to remove. And then we no longer need to call sort which is also expensive. That was done only because arrayUnique may not return items in the order they were passed in