Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better default tick rotation and tick autoskip settings #2258

Merged
merged 5 commits into from Apr 16, 2016

Conversation

tannerlinsley
Copy link
Contributor

No description provided.

@tannerlinsley
Copy link
Contributor Author

Weirdly, this presented some weird regressions when using the time scale. Even just overriding these two settings in my existing build makes the time scale not rotate at all. I'll investigate.

@tannerlinsley
Copy link
Contributor Author

Alright, just submitted a fix for the time scale as well. There was a spot where < was being used to compare unit fitting. Switching it to a <= did the trick along with measuring the label with ctx.measureText()

@tannerlinsley
Copy link
Contributor Author

Now just fixing the tests....

@tannerlinsley
Copy link
Contributor Author

Just pushed some fixes for the obvious tests. There are a bunch of others that are failing. I'm not sure why though. Heck, I don't even know if they were passing before I started.

@@ -230,14 +230,14 @@ describe('Core helper tests', function() {
},
ticks: {
beginAtZero: false,
maxRotation: 90,
maxRotation: 60,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to call this change out in the docs

@etimberg
Copy link
Member

Looks like some of the test failures are related to the default config changes.

I think the Test the layout service should fit multiple axes in the same position failed because the maxRotation changed

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 71.407% when pulling 904fbba on fix-default-tick-settings into 5e8bfea on v2.0-dev.

@tannerlinsley tannerlinsley merged commit 4f60eec into v2.0-dev Apr 16, 2016
@tannerlinsley tannerlinsley deleted the fix-default-tick-settings branch April 16, 2016 22:38
tannerlinsley added a commit that referenced this pull request Apr 16, 2016
* Update bar controller tests

* Update build

* Don't try to use undefined Scale constructors

* Add template option for point labels + test + doc update

* Make sure tick string could be null / undefined

* Fix orf/olf being undefined

* Add some optimizations to often used functions

* Add option to disable line drawing

* Removes unused context bindings

* Adds a caching system to expensive measureText() function

* Just assign instead of extend

* Do not calculate control points if we want straight lines

* Transition optimizations

* Adds different point styles

* Fix reversed ticks on linear scale + update test

* Fixes resize() function

* Fixes rect size

* Properly begin path before drawing line at edge of scale

* All sample files use CDN version of jQuery to make getting started easier.

* Fix sample file addData button

* buildOrUpdateControllers now returns an array of all the new controllers that were created. Build controllers before updating the scales but only reset them afterwards because the scales need to update label moments first.

* Add some tests for scales. Cleaned up some minor bugs in the time scale. Wrote better helpers for `helpers.min` and `helpers.max`

* Fix error in math helpers.

* Fix linear scale stacked mode

* Line and bar test updates

* Bubble controller tests

* Initial polar area tests

* default config tests

* Radar controller tests

* Built files with latest changes

* Update millisecond default format. Removed unnecessary space at right edge of time scale.

* Minor fix

* Fix stacked bar data limit calculation

* New built files

* Add default font options

* Always show lines by default.

* Fixed label callbacks adding only a single line instead of multiple lines as stated in docs.

* Fixed label callbacks adding only a single line instead of multiple lines as stated in docs.

* Fixed typo in core.helpers.js.
Added ticks.fixedStepSize configuration parameter to force linear scale steps.

* Removed debug log.

* Added documentation for fixedStepSize.
Reformatted scale.linear.js to match original indenting.

* Further reformatted scale.linear.js to match original indenting.

* Further reformatted scale.linear.js to match original indenting.
Refactored and fixed scale calculation.
Added dist files to commit.

* Fixed tab sizing in core.helpers.js

* Chart.js was missing?

* Removed nbproject folder

* Write an almost equals function and use it in the linear scale. Added a test for this new function.

* Add docs for global font options

* Update docs for #1144

* Update bar sample file to use elements config. Fixes #1292

* Updated build and documentation

* Browserify for easier UMD consumptions and vanilla builds

* Bundled builds

Possible usages are:

src/Chart.js (umd)
dist/Chart.js (ChartJS)
dist/Chart.min.js (ChartJS minified)
dist/Chart.bundle.js (ChartJS with Moment.js)
dist/Chart.bundle.min.js (ChartJS with Moment.js minified)

* Passing All Tests, Updated Dependencies

* Testing for the new build system

* Core helpers reference

* Updated Samples

* Built Files

* Documentation Updates for UMD support

* Improve joshing reporting. Added a JSHint config file.

Fixed JSHint warnings.

* begin fixing coverage tests

* Update other test tasks to use karma-browserify

* coverage report works

* use a new node version

* Use coveralls to report lines of coverage and add a badge to the readme

* Run coverage properly on the CI

* fix typo in readme

* Add codeclimate config

* explicitly run certain engines

* try and make this work

* improve syntax

* updates from running code climate locally

* add some more reporters

* Clean up code climate style issues and formatting.

* Title block tests

* Legend tests + fix minor bug where padding was not taken into account when going down to the next line

* Disable autoskipper for time scales

* When the last label would overlap with the previously shown label, skip the previously shown one

* Updated build

* Proper line and bar stacking order

Stacked line and bar charts now behave predictably with the first
dataset on the bottom stacked upwards.

* Reversible Legends

Legends can now be reversed with the `reversed: true` property.

* Tooltips now respect stacked ordering

Tooltips detect the stacked scale property now, reversing when
appropriate

* Adds the ability to draw custom point styles

* Fix radius 0

* fix alpha for tooltip colors

* Fix #2009

* Much faster cache clean up

* Fix bar chart and doughnut chart animations

* improve bubble chart sample

- fix add dataset when all datasets have been removed
- set title for chart
- remove html legend
- set same size canvas as other samples
- remove user select from canvas
- set name for added datasets

* improve line chart sample

- set title for chart
- remove html legend
- set same size canvas as other samples
- remove user select from canvas

* improve line-customTooltips sample

- set title for chart
- set same size canvas as other samples
- remove user select from canvas
- remove logs

* improve line-legend sample

- improve title
- set same size canvas as other samples
- fix x-axis labels when adding data
- remove user select from canvas
- remove logs

* fix x-axis labels when adding data

* improve line-logarithmic sample

- set title
- set same size canvas as other samples
- fix x-axis labels when adding data
- remove user select from canvas
- remove logs

* improve line-logarithmic sample

- set title
- set same size canvas as other samples
- remove user select from canvas
- remove logs

* improve line-skip-points sample

- set title
- set same size canvas as other samples
- fix x-axis labels when adding data
- remove user select from canvas
- remove logs
- remove html legend

* improve line-stacked-area sample

- set title
- set same size canvas as other samples
- fix x-axis labels when adding data
- remove user select from canvas
- remove logs
- remove html legend

* improve line-x-axis-filter sample

- set title
- set same size canvas as other samples
- fix x-axis labels when adding data
- remove user select from canvas
- remove logs

* improve radar sample

- improve title
- set same size canvas as other samples
- remove user select from canvas
- remove html legend

* improve radar-skip-points sample

- set title
- set same size canvas as other samples
- remove user select from canvas
- remove html legend

* improve tooltip-hooks sample

- set title
- set same size canvas as other samples
- fix x-axis labels when adding data
- remove user select from canvas
- remove html legend

* improve progress-bar sample

- set title
- set same size canvas as other samples
- fix x-axis labels when adding data
- remove user select from canvas

* improve progress-bar sample

- set title
- set same size canvas as other samples
- fix adding data after all data has been removed
- remove user select from canvas
- remove html legend

* improve combo-time-scale sample

- set title
- set same size canvas as other samples
- remove user select from canvas
- remove html legend
- remove logs

* improve time-scale sample

- set title
- set same size canvas as other samples
- remove user select from canvas
- remove html legend
- remove logs

* fix titles

* improve bar-multi-axis sample

- set title
- set same size canvas as other samples
- remove user select from canvas

* improve bar-stacked sample

- set title
- set same size canvas as other samples
- remove user select from canvas

* improve bar sample

- set title
- set same size canvas as other samples
- remove user select from canvas
- remove html legend
- fix x-axis labels when adding data

* improve combo-bar-line sample

- set title
- set same size canvas as other samples
- remove user select from canvas

* improve polar-area sample

- set title
- set same size canvas as other samples
- remove user select from canvas

* improve polar-area sample

- set title
- set same size canvas as other samples
- remove user select from canvas

* improve scatter-multi-axis sample

- set title
- set same size canvas as other samples
- remove user select from canvas

* improve scatter sample

- set title
- set same size canvas as other samples
- remove user select from canvas

* improve doughnut sample

- set title
- set same size canvas as other samples
- remove user select from canvas
- remove html legend
- remove logs

* fix title

* fix consistency with other samples

* Fix global font settings

* Take padding into account when determining the model coordinates from event coordinates

* Updated build files

* Fix legend generation when no datasets

* Fixes #2086 by introducing a new time.parser option with high priority to replace the (deprecated) time.format

* fixed travis built

* fixed test and added a test for a custom date parser

* fixed timezone bug in test

* Fix some time rounding problems

* Fix test for time zone difference

* Allow ticks.fixedStepSize or ticks.stepSize options to mean the same thing

* Expose yAlign and xAlign as a tooltip option

* Moved _model xAlign and yAlign setting to Positioning section and
swapped y and x

* Missing whitespaces and code markup fixes

* Added 'borderSkipped' parameter to Rectangle.

* Fixed bar.controller tests

* Fix animation bug. Helpers.findNextWhere no longer returned the index of the item. This causes the wrong animation object to be removed.

* Add composer.json

* Fix axis IDs in documentation

* Fix zoom reset

* Better conversion to ticks to make it easier to use callbacks

* Instead of showing a warning on load, throw an error on create if moment is not defined.

* Better use of default scale types.

* Update built files

* Fix scale merge when the xAxes object is specified but the type is not

* Updated build

* Update doc version

* Removed the default padding

You should put a style on the container element

* Fix tests

* Fix doc titles

* Better handling when data.datasets does not exist

* Minor doc fixes

* Add initial implementation of constraint percentage width / height support. Added tests for dom sizing methods.

* use watchify for incremental test rebuilds

* Refactoring to reduce code size

* Use latest firefox version

* Install latest chrome before running tests

* Fix typo

* Clip out the chart area so that things outside do not draw

* Category scale supports min / max

* Update doc file to indicate that category scale supports min/max attributes

* Fix jshint error

* Built files

* Bump version to v2.0.0

* Fix whitespace in Line Chart documentation

* Document the point radius setting

* Don't measure undefined or null strings.

* fix "main" file path in bower.json

* Allow gradients to be used as colors without causing errors when e.g. calling the color helper to generate the defualt colour value for hover

* Fixed legendCallback() html generation

Fixed legendCallback's html generation so that the span lies next to the text instead of being around it.

* Fixed the generateLegend function

Fixed the generateLegend function to create the colour block next to the text instead of around it.

* Returned Chart.js build file back to normal

* Using the dynamic absolute position of the canvas, even for relative placement of the chart

This will work with both relative and absolute position for the chart and will apply the tooltips appropriately. I have tested in a normal context and then also using the chart in the second column of two column table i.e. in a different position on the screen. Without this, the default tooltips will appear at the same position no matter where the chart is placed. They will appear misplaced. The fix I have provided allows the tooltips to appear smoothly with the chart, no matter where it is placed on the web page.

* Data Labels display for Line Bar combo for v2.0

Data Labels display for Line Bar combo for v2.0

* Optimize animation frame requests (#2268)

The animation service now keeps track of the active animation frame request and will skip new requests until the current one is executed. This can happen when processing mouse events, e.g. 'mousemove' and 'mouseout' events will trigger multiple renders.

* try a different travis config

* Newer ubuntu version

* Added rotation and circumference properties to doughnut/pie charts

* Bump and build for 2.0.1

* Better default tick rotation and tick autoskip settings (#2258)

* Better default tick rotation and tick autoskip settings

* scale.time: Use ctx to measure label, and <= instead of < for unit fitting

* Test Changes

* Passing Tests with new defaults

* 2.0.2

* Fix for doughnut rotation = 0, added unit test for doughnut rotation/circumference properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants