Ben McCann
919e50b9fc
Generate ticks from small to large ( #7559 )
...
* Generate ticks from small to large
* Add note to migration guide
2020-06-29 07:52:28 -04:00
Ben McCann
6e02f30252
Remove unused parameter ( #7480 )
2020-06-09 07:51:12 -04:00
Jukka Kurkela
d801e56106
Update dependencies and alter privacy of functions ( #7138 )
...
* Update dependencies
* Fix privacy problems
* color lib & consistency
* Review update
* getLabelCapacity
* Review update
2020-02-22 08:35:16 -05:00
Ben McCann
e2145e3b55
Turn on excludeNotExported ( #7121 )
2020-02-20 12:18:21 -05:00
Ben McCann
2e5b072251
Turn on some TypeScript checks ( #7116 )
...
Turn on some TypeScript checks
2020-02-20 09:43:16 -05:00
Ben McCann
3682da7899
JSDoc fixes ( #7112 )
2020-02-17 14:31:43 -05:00
Jukka Kurkela
25a9969489
Enable esnext and fix all lint errors ( #7094 )
...
* enable esnext and fix all lint errors
* Review update
* Missed some
* Some cleanup still
* Remove leftover eslint disable
2020-02-13 18:41:49 -05:00
Ben McCann
40b8254ca4
Cleanup private methods on Scales ( #7082 )
2020-02-11 19:18:13 -05:00
Ben McCann
795c86e95b
Fix errors reported by TypeScript compiler ( #7030 )
2020-02-07 18:03:33 -05:00
Ben McCann
1c18a74ea0
Fix some JSDoc errors ( #7026 )
...
* Fix some JSDoc errors
* Fix helpers.dom JSDoc errors
* Add scale JSDoc errors
* Address review comment
* Fix additional errors
* Document optional parameters
* JSDoc fixes for datasetController
* Remove undefined
2020-02-03 07:52:55 -05:00
Ben McCann
f5d9892ad8
Improved formatting of numeric scale labels ( #7007 )
...
* Improved formatting of numeric scale labels
* Put locale on options
* Use scientific notation for big ticks
* Remove extra parameter
2020-02-03 07:36:30 -05:00
Ben McCann
2647dd0fbf
scale.linearbase cleanup ( #7038 )
2020-01-31 07:09:52 -05:00
Ben McCann
1ae11c4d40
Format numbers in tooltip ( #7004 )
...
* Format numbers in tooltip
* Add check for typeof number
* Implement only for linear and log scales
2020-01-27 17:58:58 -05:00
Evert Timberg
b097fe43c9
Linear scale with min/max/stepSize set should use all 3 if the range fits ( #6966 )
...
When (max - min) / stepSize is an integer, we can do a very simple
tick generation method.
2020-01-18 08:35:30 -05:00
Jukka Kurkela
dbd835f4f3
Use ticks consistently ( #6873 )
2019-12-30 17:14:55 -05:00
Evert Timberg
c8bdca62e8
Move all helpers to src/helpers ( #6841 )
...
* Move all helpers into src/helpers
* Move curve helpers to their own file
* DOM helpers moved to their own file
* Update migration docs
* Remove migration docs on new functions
2019-12-17 08:04:40 -05:00
Evert Timberg
7c41b6ae8a
Scale use modules ( #6813 )
2019-12-06 19:44:53 -05:00
Evert Timberg
4b4b4b79e1
Convert all scales to use ES6 classes
2019-11-16 13:49:35 -05:00
Jukka Kurkela
7f97adf5a0
Move scale defining options up from ticks ( #6738 )
...
* Move scale defining options up from `ticks`
* Include `ticks.reverse` in v3-migration
2019-11-15 12:11:13 -05:00
Jukka Kurkela
76a89f0922
determineDataLimits optimizations ( #6695 )
2019-11-12 19:24:07 -05:00
Evert Timberg
94afa63450
Remove zeroLineIndex functionality ( #6697 )
...
* Remove zeroLineIndex functionality
* Remove docs
* Code review updates
2019-11-07 06:27:49 -05:00
Jukka Kurkela
72df272234
Early data parsing, stacking by value and support object data ( #6576 )
...
* Early data parsing + stacking by value
* Review comments
* review comments
* Remove reduntant parsing
* Couple CC warnings
* Optimize filterBetween
* More migration info
2019-11-04 18:07:01 -05:00
Ben McCann
99811328dc
Make all ticks objects ( #6645 )
...
Make all ticks object
2019-10-31 18:45:13 -04:00
Jukka Kurkela
cbace1cfe2
Handle reverse support in core.scale ( #6343 )
...
* Move log10 from core.helpers to helpers.math
* Refactor scales
2019-07-15 17:20:16 -04:00
Jukka Kurkela
75e76cffe5
Make decimalPlaces private and update CDN links ( #6131 )
2019-03-13 10:36:10 +01:00
Ben McCann
2f874fde62
Use lowercase for primitives in jsdocs ( #6033 )
2019-02-11 08:51:39 +01:00
Jukka Kurkela
9d7eacd251
Fix generateTicks when working with tiny numbers ( #5948 )
2019-01-09 07:58:13 +01:00
Simon Brunel
87e44fa360
Cleanup scales export for better import strategy ( #5953 )
...
Scales now export their class and associated defaults (`_defaults`), the registration being done globally in `src/chart.js`.
2019-01-05 14:37:54 +01:00
Akihiko Kusanagi
aae05a08da
Improve tick generation for linear scales ( #5938 )
...
* Improve tick generation for linear scales
* Simplify the tick generation code
* Refactor getTickLimit
2019-01-01 08:38:09 -05:00
Simon Brunel
52b9793ba0
Use HTTPS instead of HTTP for URLs supporting it
2018-12-17 07:50:02 +01:00
Akihiko Kusanagi
637c2176ec
Support decimal stepSize ( #5786 )
2018-11-12 21:12:09 +01:00
Carl Osterwisch
7a65546629
Fix scale when data is all small numbers ( #5723 )
...
* Add test for correct handling of small numbers
* Calculate tick precision for arbitrarily small numbers
* Use scientific notation for very small tick numbers
* Calculate significant digits for exponential tick values
2018-09-16 11:33:48 +02:00
Colin
352268616b
Fix min and max option checks in linear scales ( #5209 )
...
When 0, the min and max options was considered not being set, instead we should check for null or undefined.
2018-07-29 18:09:16 +02:00
Simon Brunel
bee8e3cd9b
Make Chart.Scale/scaleService importable ( #5383 )
2018-04-02 17:43:28 -04:00
Evert Timberg
9fbac88938
Add ticks.precision option to linear scale. ( #4841 )
...
If defined and `stepSize` is not specified, the step size will be rounded to this many decimal places.
2018-04-01 18:56:45 +02:00
Ben McCann
33c7d941f7
Add back Chart.Ticks.formatters ( #5088 )
2018-01-06 18:59:47 +01:00
Ben McCann
56fdd7ebc1
Allow specifying bar chart via {x, y} data points ( #4565 )
2017-07-29 21:22:52 +02:00
Simon Brunel
889ecd560b
Make Chart.defaults/Ticks/Interaction importable ( #4512 )
...
Default options can now be accessed by importing `core/core.defaults`. The returned object acts as a singleton and is populated when importing classes that expose their own default values (meaning that importing only `code.defaults` results in an empty object). Also make `Chart.Ticks` and `Chart.Interaction` importable since existing defaults rely on these values.
Add the `defaults._set` method that make easier declaring new defaults by merging given values with existing ones for a specific scope (`global`, `scale`, `bar`, etc).
2017-07-16 19:38:19 +02:00
Simon Brunel
717e8d950a
Make Chart.helpers importable ( #4479 )
...
Properly export helpers and remove dependencies to `Chart.helpers`. Helpers can now be accessed from `src/helpers/index.js` (`var helpers = require('path/to/helpers/index')`, instead of `var helpers = Chart.helpers`).
2017-07-15 15:13:56 +02:00
etimberg
ccb2898539
When all datasets are hidden, the linear scale defaults to a range of 0 - 1.
...
If `ticks.min` was set this would not set the range correctly.
Added a test to cover this case as well
2017-06-25 13:32:08 -04:00
Simon Brunel
5d95280d7b
Change valueAtIndexOrDefault behavior ( #4423 )
...
For consistency with `valueOrDefault`, `valueAtIndexOrDefault` now returns null if `value` (expected array) is null. Also get rid of the superfluous `get` prefix in `getValueOrDefault` and `getValueAtIndexOrDefault`.
2017-06-25 10:54:37 +02:00
GabrielMancik
254bd4bf86
Fixed calculation of scale min and max when dataset contains no values ( #4064 )
...
* Fixed different calculation of scale min and max when dataset contains no values
* Removed trailing spaces
* Added test for correct min/max calculation
* Removed trailing spaces
2017-04-15 12:37:49 -04:00
Josh Soref
67934920be
Spelling fixes ( #3522 )
...
Including: actually, aspect, bottom, changes, characters, datasets, divisible, downward, guidelines, instance, instances, interrupted, item, javascript, label, lifecycle, lines, plugins, manually, milliseconds, nearest, occurring, position, predefined, recalculate, tooltip, those
2016-10-27 21:18:31 +02:00
Evert Timberg
d09a17a2b1
Better number -> string callback for the radial linear scale ( #3281 )
...
Also create a new Chart.Ticks namespace to host common tick generators and formatters.
2016-09-24 22:56:16 +02:00
Zach Panzarino
2d2f475a7a
First round of eslint fixes
2016-09-14 18:05:19 +00:00
Zach Panzarino
abfbdd5f31
Remove unneeded trailing commas
2016-08-10 01:35:34 +00:00
Simon Brunel
f36123925c
Fix #2734 Cleanup unused variables
2016-06-18 11:00:11 +02:00
zachpanz88
5fae4dd305
Change this -> me in source files
...
This change allows for smaller minified code in the final version, resulting in a smaller file size. Some files had previously used _this, but that has been changed to me to keep consistency throughout the project.
2016-06-04 14:14:16 -04:00
Evert Timberg
3cd21c8053
Linear and RadialLinear scales now derive from a common base class
2016-05-29 10:16:47 -04:00