Commit Graph

26 Commits

Author SHA1 Message Date
Jukka Kurkela
c51af9f13e
Fix category scale tick placement with autoSkip (#7622) 2020-07-15 18:12:32 -04:00
Jukka Kurkela
6bd5ad5518
Generic registry for controllers, scales, elements and plugins (#7435)
* Generic registry for controllers, scales, elements and plugins
* Remove references to scale service
2020-07-06 17:38:04 -04:00
Jukka Kurkela
59a1af91ac
Replace horizontalBar with indexAxis: 'y' (#7514)
* Replace horizontalBar with indexAxis: 'y'
* Fix drawing of line for last x-position
* Consistently determine axis of scale
* Add test
2020-06-18 17:35:52 -04:00
Ben McCann
a301ca148c
Add a scale.init method (#7346) 2020-05-12 16:44:40 -04:00
Jukka Kurkela
f0fd28af66
Allow "spriting" text in fixtures (#7073)
Allow "blit" text drawing in fixtures
2020-02-14 12:33:08 -05:00
Jose Raul Pérez
b1421c6ea1 Add stroke lines option around ticks to improve readability (#6787)
Enable stroking of text on of axis labels
2020-01-12 14:22:51 -05:00
Evert Timberg
374b7491a3
Allow axes to be centered on the chart area (#6818)
Allow axes to be centered on the chart area or at a dynamic position based on another axis
2019-12-16 18:17:42 -05:00
Jukka Kurkela
ce74eb76a1 Convert axis options from arrays to objects (#6773)
* Convert axis options from arrays to objects

* Updated all chart type defaults
* Throw errors when axis type or position are not specified
* Avoid raising unnecessary errors when merging options into the default configs

* Fix additional tests

* Ensure scale defaults are set if type is not explicitly defined

* Another step

* Include `scale` as `firstIDs.r`

* update docs

* Update for buildOrUpdateScales

* Update migration guide

* Add test back
2019-11-21 18:46:49 -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
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
Akihiko Kusanagi
626d8cc714 Draw the rightmost grid line when offsetGridLines is true (#6326)
* Draw the rightmost grid line when offsetGridLines is true

* Refactor based on feedback

* Replace helpers.each with for loop

* Minor refactoring

* Refactor _computeItemsToDraw
2019-07-18 18:25:33 -04:00
Akihiko Kusanagi
bb5f12ad2a Support object values for bar charts (#6323)
* Support object values for bar charts

* Check if null or undefined

* Refactor category scale code

* Make isNullOrUndef global
2019-06-19 07:10:03 -04:00
Jukka Kurkela
7bbf3cab5b Return correct label for value type axis (#5920) 2019-01-17 16:04:08 +01:00
Akihiko Kusanagi
d29ec5a485 Add scale.pointLabels.lineHeight and scale.ticks.lineHeight options (#5914) 2018-12-20 09:56:06 +01:00
Akihiko Kusanagi
40495ec9d0 Fix the rounding issue of floating point numbers in category scale (#5880)
- Remove `Math.round` in the category scale code
- Add `helpers._alignPixel` to align grid/tick/axis border lines
- Fix grid/tick/axis border line calculation
- Add a check of the width of the axis border
- Refactor core.scale code
2018-12-09 11:34:34 +01:00
Akihiko Kusanagi
7c45fdac0d Remove gaps on the left and right when the axis offset is true (#5884) 2018-12-05 17:59:07 +01:00
andig
ea703a54bf Implement scale label padding (#4646) 2017-09-10 13:15:47 -04:00
Akihiko Kusanagi
7dc71d009b Make offsetGridLines consistent and add new offset scale option (#4545)
Add a new `offset` option to scales to add extra space at edges and remove the `includeOffset` argument from `getPixelForValue()` and `getPixelForTick()`. The bar controller now automatically calculates the bar width to avoid overlaps. When `offsetGridLines` is true, grid lines move to the left by one half of the tick interval, and labels don't move.
2017-08-14 10:09:33 +02:00
Ben McCann
f6b6956a3a Fix ESLint errors (#4485) 2017-07-22 09:19:06 +02:00
Simon Brunel
090196c07c Add support for line height CSS values (#4531)
The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix incorrect text positioning in the title plugin.

https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
2017-07-20 19:20:54 +02:00
andig
3bb31ca592 Allow category labels definition at scale level (#4506) 2017-07-19 12:41:17 +02:00
Andrew
2d7c1f0d2c Time axis tick formatting with major and minor units (#4268)
Working towards creating the TimeSeries scale, this PR adds formatting for major and minor ticks on axes.
2017-06-15 07:20:16 -04:00
Lee N Dobryden
20a832809e Zero line dash options (#4019)
* Add of zero line border dash options
* Update Readme with zero line border dash config options
2017-03-21 06:38:09 -04:00
Simon Brunel
c216c0af76 Cleanup and upgrade unit tests environment
`karma.conf.ci.js` has been merged into `karma.conf.js` for local testing consistency: `gulp unittestWatch` has been replaced by `gulp unittest --watch` and thus use exactly the same config file. Upgrade to latest jasmine and karma packages and remove deprecated `gulp-karma` dependency (directly use `karma.Server` in gulp).

Split `test/mockContext.js` into smaller `test/jasmine.*` modules to make easier unit tests maintenance and finally, move all `*.test.js` files under the `test/specs` folder.
2017-03-04 11:39:48 -05:00