language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/08-Bubble-Chart.md
@@ -1,100 +0,0 @@ ---- -title: Bubble Chart -anchor: bubble-chart ---- -### Introduction -A bubble chart is used to display three dimensions of data at the same time. The location of the bubble is determined by the first two dimensions and the corresponding horizontal and vertical axes. The third dimension is represent...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/09-Advanced.md
@@ -1,467 +0,0 @@ ---- -title: Advanced usage -anchor: advanced-usage ---- - - -### Prototype Methods - -For each chart, there are a set of global prototype methods on the shared `ChartType` which you may find useful. These are available on all charts created with Chart.js, but for the examples, let's use a line chart ...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/10-Notes.md
@@ -1,115 +0,0 @@ ---- -title: Notes -anchor: notes ---- -### Previous versions - -Version 2 has a completely different API than earlier versions. - -Most earlier version options have current equivalents or are the same. - -Please use the documentation that is available on [chartjs.org](http://www.chartjs.org/docs/) fo...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/README.md
@@ -0,0 +1,65 @@ +# Chart.js + +[![Chart.js on Slack](https://img.shields.io/badge/slack-Chart.js-blue.svg)](https://chart-js-automation.herokuapp.com/) + +## Installation + +You can download the latest version of Chart.js from the [GitHub releases](https://github.com/chartjs/Chart.js/releases/latest) or use a [Chart.j...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/SUMMARY.md
@@ -0,0 +1,50 @@ +# Summary + +* [Chart.js](README.md) +* [Getting Started](getting-started/README.md) + * [Installation](getting-started/installation.md) + * [Integration](getting-started/integration.md) + * [Usage](getting-started/usage.md) +* [General](general/README.md) + * [Responsive](general/responsive.md) +...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/axes/README.md
@@ -0,0 +1,57 @@ +# Axes + +Axes are an integral part of a chart. They are used to determine how data maps to a pixel value on the chart. In a cartesian chart, there is 1 or more X axis and 1 or more Y axis to map points onto the 2 dimensional canvas. These axes are know as ['cartesian axes'](./cartesian/README.md#cart...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/axes/cartesian/README.md
@@ -0,0 +1,104 @@ +# Cartesian Axes + +Axes that follow a cartesian grid are known as 'Cartesian Axes'. Cartesian axes are used for line, bar, and bubble charts. Four cartesian axes are included in Chart.js by default. + +* [linear](./linear.md#linear-cartesian-axis) +* [logarithmic](./logarithmic.md#logarithmic-cartes...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/axes/cartesian/category.md
@@ -0,0 +1,36 @@ +# Category Cartesian Axis + +The category scale will be familiar to those who have used v1.0. Labels are drawn from one of the label arrays included in the chart data. If only `data.labels` is defined, this will be used. If `data.xLabels` is defined and the axis is horizontal, this will be used. Simil...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/axes/cartesian/linear.md
@@ -0,0 +1,74 @@ +# Linear Cartesian Axis + +The linear scale is use to chart numerical data. It can be placed on either the x or y axis. The scatter chart type automatically configures a line chart to use one of these scales for the x axis. As the name suggests, linear interpolation is used to determine where a value ...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/axes/cartesian/logarithmic.md
@@ -0,0 +1,12 @@ +# Logarithmic Cartesian Axis + +The logarithmic scale is use to chart numerical data. It can be placed on either the x or y axis. As the name suggests, logarithmic interpolation is used to determine where a value lies on the axis. + +## Tick Configuration Options + +The following options are provided ...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/axes/cartesian/time.md
@@ -0,0 +1,97 @@ +# Time Cartesian Axis + +The time scale is used to display times and dates. When building its ticks, it will automatically calculate the most comfortable unit base on the size of the scale. + +## Configuration Options + +The following options are provided by the time scale. They are all located in the...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/axes/labelling.md
@@ -0,0 +1,42 @@ +# Labeling Axes + +When creating a chart, you want to tell the viewer what data they are viewing. To do this, you need to label the axis. + +## Scale Title Configuration + +The scale label configuration is nested under the scale configuration in the `scaleLabel` key. It defines options for the scale t...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/axes/radial/README.md
@@ -0,0 +1,5 @@ +# Radial Axes + +Radial axes are used specifically for the radar and polar area chart types. These axes overlay the chart area, rather than being positioned on one of the edges. One radial axis is included by default in Chart.js. + +* [linear](./linear.md#linear-radial-axis) \ No newline at end of file
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/axes/radial/linear.md
@@ -0,0 +1,110 @@ +# Linear Radial Axis + +The linear scale is use to chart numerical data. As the name suggests, linear interpolation is used to determine where a value lies in relation the center of the axis. + +The following additional configuration options are provided by the radial linear scale. + +## Configuratio...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/axes/styling.md
@@ -0,0 +1,35 @@ +# Styling + +There are a number of options to allow styling an axis. There are settings to control [grid lines](#grid-line-configuration) and [ticks](#tick-configuration). + +## Grid Line Configuration + +The grid line configuration is nested under the scale configuration in the `gridLines` key. It de...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/charts/README.md
@@ -0,0 +1,11 @@ +# Charts + +Chart.js comes with built-in chart types: +* [line](./line.md) +* [bar](./bar.md) +* [radar](./radar.md) +* [polar area](./polar.md) +* [doughnut and pie](./doughnut.md) +* [bubble](./bubble.md) + +To create a new chart type, see the [developer notes](../developers/charts.md#new-charts) \ ...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/charts/bar.md
@@ -0,0 +1,149 @@ +# Bar +A bar chart provides a way of showing data values represented as vertical bars. It is sometimes used to show trend data, and the comparison of multiple data sets side by side. + +## Example Usage +```javascript +var myBarChart = new Chart(ctx, { + type: 'bar', + data: data, + options:...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/charts/bubble.md
@@ -0,0 +1,60 @@ +# Bubble Chart + +A bubble chart is used to display three dimensions of data at the same time. The location of the bubble is determined by the first two dimensions and the corresponding horizontal and vertical axes. The third dimension is represented by the size of the individual bubbles. + +## Examp...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/charts/doughnut.md
@@ -0,0 +1,79 @@ +# Doughnut and Pie +Pie and doughnut charts are probably the most commonly used charts. They are divided into segments, the arc of each segment shows the proportional value of each piece of data. + +They are excellent at showing the relational proportions between data. + +Pie and doughnut charts are e...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/charts/line.md
@@ -0,0 +1,213 @@ +# Line +A line chart is a way of plotting data points on a line. Often, it is used to show trend data, or the comparison of two data sets. + +## Example Usage +```javascript +var myLineChart = new Chart(ctx, { + type: 'line', + data: data, + options: options +}); +``` + +## Dataset Propertie...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/charts/mixed.md
@@ -0,0 +1,37 @@ +# Mixed Chart Types + +With Chart.js, it is possible to create mixed charts that are a combination of two or more different chart types. A common example is a bar chart that also includes a line dataset. + +Creating a mixed chart starts with the initialization of a basic chart. + +```javascript +var m...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/charts/polar.md
@@ -0,0 +1,69 @@ +# Polar Area + +Polar area charts are similar to pie charts, but each segment has the same angle - the radius of the segment differs depending on the value. + +This type of chart is often useful when we want to show a comparison data similar to a pie chart, but also show a scale of values for context....
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/charts/radar.md
@@ -0,0 +1,97 @@ +# Radar +A radar chart is a way of showing multiple data points and the variation between them. + +They are often useful for comparing the points of two or more different data sets. + +## Example Usage +```javascript +var myRadarChart = new Chart(ctx, { + type: 'radar', + data: data, + option...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/charts/scatter.md
@@ -0,0 +1,49 @@ +# Scatter Chart + +Scatter charts are based on basic line charts with the x axis changed to a linear axis. To use a scatter chart, data must be passed as objects containing X and Y properties. The example below creates a scatter chart with 3 points. + +```javascript +var scatterChart = new Chart(ctx, ...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/configuration/README.md
@@ -0,0 +1,34 @@ +# Configuration + +The configuration is used to change how the chart behaves. There are properties to control styling, fonts, the legend, etc. + +## Global Configuration + +This concept was introduced in Chart.js 1.0 to keep configuration [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself), a...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/configuration/animations.md
@@ -0,0 +1,96 @@ +# Animations + +Chart.js animates charts out of the box. A number of options are provided to configure how the animation looks and how long it takes + +## Animation Configuration + +The following animation options are available. The global options for are defined in `Chart.defaults.global.animation`. ...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/configuration/elements.md
@@ -0,0 +1,69 @@ +# Elements + +While chart types provide settings to configure the styling of each dataset, you sometimes want to style **all datasets the same way**. A common example would be to stroke all of the bars in a bar chart with the same colour but change the fill per dataset. Options can be configured for f...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/configuration/layout.md
@@ -0,0 +1,29 @@ +# Layout Configuration + +The layout configuration is passed into the `options.layout` namespace. The global options for the chart layout is defined in `Chart.defaults.global.layout`. + +| Name | Type | Default | Description +| -----| ---- | --------| ----------- +| `padding` | `Number` or `Object` | ...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/configuration/legend.md
@@ -0,0 +1,166 @@ +# Legend Configuration + +The chart legend displays data about the datasets that area appearing on the chart. + +## Configuration options +The legend configuration is passed into the `options.legend` namespace. The global options for the chart legend is defined in `Chart.defaults.global.legend`. + +|...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/configuration/title.md
@@ -0,0 +1,41 @@ +# Title + +The chart title defines text to draw at the top of the chart. + +## Title Configuration +The title configuration is passed into the `options.title` namespace. The global options for the chart title is defined in `Chart.defaults.global.title`. + +| Name | Type | Default | Description +| ----...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/configuration/tooltip.md
@@ -0,0 +1,292 @@ +# Tooltips + +## Tooltip Configuration + +The tooltip configuration is passed into the `options.tooltips` namespace. The global options for the chart tooltips is defined in `Chart.defaults.global.tooltips`. + +| Name | Type | Default | Description +| -----| ---- | --------| ----------- +| `enabled` |...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/developers/README.md
@@ -0,0 +1,22 @@ +# Developers +Developer features allow extending and enhancing Chart.js in many different ways. + +# Browser support + +Chart.js offers support for all browsers where canvas is supported. + +Browser support for the canvas element is available in all modern & major mobile browsers. [CanIUse](http://can...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/developers/api.md
@@ -0,0 +1,143 @@ +# Chart Prototype Methods + +For each chart, there are a set of global prototype methods on the shared `ChartType` which you may find useful. These are available on all charts created with Chart.js, but for the examples, let's use a line chart we've made. + +```javascript +// For example: +var myLine...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/developers/axes.md
@@ -0,0 +1,131 @@ +# New Axes + +Axes in Chart.js can be individually extended. Axes should always derive from Chart.Scale but this is not a mandatory requirement. + +```javascript +let MyScale = Chart.Scale.extend({ + /* extensions ... */ +}); + +// MyScale is now derived from Chart.Scale +``` + +Once you have crea...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/developers/charts.md
@@ -0,0 +1,116 @@ +# New Charts + +Chart.js 2.0 introduces the concept of controllers for each dataset. Like scales, new controllers can be written as needed. + +```javascript +Chart.controllers.MyType = Chart.DatasetController.extend({ + +}); + + +// Now we can create a new instance of our chart, using the Chart.js AP...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/developers/contributing.md
@@ -0,0 +1,34 @@ +# Contributing + +New contributions to the library are welcome, but we ask that you please follow these guidelines: + +- Use tabs for indentation, not spaces. +- Only change the individual files in `/src`. +- Check that your code will pass `eslint` code standards, `gulp lint` will run this for you. +-...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/developers/plugins.md
@@ -0,0 +1,140 @@ +# Plugins + +Plugins are the most efficient way to customize or change the default behavior of a chart. They have been introduced at [version 2.1.0](https://github.com/chartjs/Chart.js/releases/tag/2.1.0) (global plugins only) and extended at [version 2.5.0](https://github.com/chartjs/Chart.js/releas...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/general/README.md
@@ -0,0 +1,8 @@ +# General Chart.js Configuration + +These sections describe general configuration options that can apply elsewhere in the documentation. + +* [Colors](./colors.md) defines acceptable color values +* [Font](./fonts.md) defines various font options +* [Interactions](./interactions/README.md) defines opt...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/general/colors.md
@@ -0,0 +1,49 @@ +# Colors + +When supplying colors to Chart options, you can use a number of formats. You can specify the color as a string in hexadecimal, RGB, or HSL notations. If a color is needed, but not specified, Chart.js will use the global default color. This color is stored at `Chart.defaults.global.defaultC...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/general/fonts.md
@@ -0,0 +1,28 @@ +# Fonts + +There are 4 special global settings that can change all of the fonts on the chart. These options are in `Chart.defaults.global`. The global font settings only apply when more specific options are not included in the config. + +For example, in this chart the text will all be red except for t...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/general/interactions/README.md
@@ -0,0 +1,9 @@ +# Interactions + +The hover configuration is passed into the `options.hover` namespace. The global hover configuration is at `Chart.defaults.global.hover`. To configure which events trigger chart interactions, see [events](./events.md#events). + +| Name | Type | Default | Description +| ---- | ---- | ...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/general/interactions/events.md
@@ -0,0 +1,21 @@ +# Events +The following properties define how the chart interacts with events. + +| Name | Type | Default | Description +| ---- | ---- | ------- | ----------- +| `events` | `String[]` | `["mousemove", "mouseout", "click", "touchstart", "touchmove", "touchend"]` | The `events` option defines the browse...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/general/interactions/modes.md
@@ -0,0 +1,104 @@ +# Interaction Modes + +When configuring interaction with the graph via hover or tooltips, a number of different modes are available. + +The modes are detailed below and how they behave in conjunction with the `intersect` setting. + +## point +Finds all of the items that intersect the point. + +```jav...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/general/responsive.md
@@ -0,0 +1,10 @@ +# Responsive Charts + +Chart.js provides a few options for controlling resizing behaviour of charts. + +| Name | Type | Default | Description +| ---- | ---- | ------- | ----------- +| `responsive` | `Boolean` | `true` | Resizes the chart canvas when its container does. +| `responsiveAnimationDuration`...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/getting-started/README.md
@@ -0,0 +1,43 @@ +# Getting Started + +Let's get started using Chart.js! + +First, we need to have a canvas in our page. + +```html +<canvas id="myChart"></canvas> +``` + +Now that we have a canvas we can use, we need to include Chart.js in our page. + +```html +<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/getting-started/installation.md
@@ -0,0 +1,41 @@ +# Installation +Chart.js can be installed via npm or bower. It is recommended to get Chart.js this way. + +## npm + +```bash +npm install chart.js --save +``` + +## Bower + +```bash +bower install chart.js --save +``` + +## CDN +or just use these [Chart.js CDN](https://cdnjs.com/libraries/Chart.js) li...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/getting-started/integration.md
@@ -0,0 +1,34 @@ +# Integration + +Chart.js can be integrated with plain JavaScript or with different module loaders. The examples below show how to load Chart.js in different systems. + +## ES6 Modules + +```javascript +import Chart from 'chart.js' +var myChart = new Chart(ctx, {...}) +``` + +## Script Tag + +```html ...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/getting-started/usage.md
@@ -0,0 +1,65 @@ +# Usage +Chart.js can be used with ES6 modules, plain JavaScript and module loaders. + +## Creating a Chart + +To create a chart, we need to instantiate the `Chart` class. To do this, we need to pass in the node, jQuery instance, or 2d context of the canvas of where we want to draw the chart. Here's a...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/notes/README.md
@@ -0,0 +1 @@ +# Additional Notes \ No newline at end of file
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/notes/comparison.md
@@ -0,0 +1,32 @@ +# Comparison with Other Charting Libraries + +Library Features + +| Feature | Chart.js | D3 | HighCharts | Chartist | +| ------- | -------- | --- | ---------- | -------- | +| Completely Free | &check; | &check; | | &check; | +| Canvas | &check; | | | | +| SVG | | &check; | &check; | &check; | +| Built...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/notes/extensions.md
@@ -0,0 +1,26 @@ +# Popular Extensions + +There are many extensions which are available for use with popular frameworks. Some particularly notable ones are listed here. + +## Angular + - <a href="https://github.com/jtblin/angular-chart.js" target="_blank">angular-chart.js</a> + - <a href="https://github.com/carlcraig/t...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/notes/license.md
@@ -0,0 +1,3 @@ +# License + +Chart.js is <a href="https://github.com/chartjs/Chart.js" target="_blank">open source</a> and available under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>. \ No newline at end of file
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
docs/style.css
@@ -0,0 +1,11 @@ +a.anchorjs-link { + color: rgba(65, 131, 196, 0.1); + font-weight: 400; + text-decoration: none; + transition: color 100ms ease-out; + z-index: 999; +} + +a.anchorjs-link:hover { + color: rgba(65, 131, 196, 1); +}
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
gulpfile.js
@@ -11,7 +11,7 @@ var streamify = require('gulp-streamify'); var uglify = require('gulp-uglify'); var util = require('gulp-util'); var zip = require('gulp-zip'); -var exec = require('child_process').exec; +var exec = require('child-process-promise').exec; var karma = require('karma'); var browserify = require('bro...
true
Other
chartjs
Chart.js
3e94b9431a5b3d6e4bfbfd6a2339a350999b3292.json
Update the docs structure/content to use GitBook (#3751) Update the docs structure/content to use GitBook
package.json
@@ -13,7 +13,9 @@ "browserify": "^13.0.0", "browserify-istanbul": "^0.2.1", "bundle-collapser": "^1.2.1", + "child-process-promise": "^2.2.0", "coveralls": "^2.11.6", + "gitbook-cli": "^2.3.0", "gulp": "3.9.x", "gulp-concat": "~2.1.x", "gulp-connect": "~2.0.5",
true
Other
chartjs
Chart.js
b92b256872e9d01ef56c9b8d4440cda784662fe0.json
Flatten animation object and fix callbacks Animation callbacks now receives `animationObject` directly with a reference on the associated chart (`animation.chart`), which deprecates `animation.animationObject` and `animation.chartInstance`. Also fix missing `onComplete` animation argument and make sure that an animati...
docs/01-Chart-Configuration.md
@@ -339,29 +339,18 @@ Name | Type | Default | Description --- |:---:| --- | --- duration | Number | 1000 | The number of milliseconds an animation takes. easing | String | "easeOutQuart" | Easing function to use. Available options are: `'linear'`, `'easeInQuad'`, `'easeOutQuad'`, `'easeInOutQuad'`, `'easeInCubic'`, ...
true
Other
chartjs
Chart.js
b92b256872e9d01ef56c9b8d4440cda784662fe0.json
Flatten animation object and fix callbacks Animation callbacks now receives `animationObject` directly with a reference on the associated chart (`animation.chart`), which deprecates `animation.animationObject` and `animation.chartInstance`. Also fix missing `onComplete` animation argument and make sure that an animati...
samples/animation/progress-bar.html
@@ -33,12 +33,12 @@ borderColor: window.chartColors.red, backgroundColor: window.chartColors.red, data: [ - randomScalingFactor(), - randomScalingFactor(), - randomScalingFactor(), - ...
true
Other
chartjs
Chart.js
b92b256872e9d01ef56c9b8d4440cda784662fe0.json
Flatten animation object and fix callbacks Animation callbacks now receives `animationObject` directly with a reference on the associated chart (`animation.chart`), which deprecates `animation.animationObject` and `animation.chartInstance`. Also fix missing `onComplete` animation argument and make sure that an animati...
src/core/core.animation.js
@@ -13,13 +13,14 @@ module.exports = function(Chart) { }; Chart.Animation = Chart.Element.extend({ - currentStep: null, // the current animation step + chart: null, // the animation associated chart instance + currentStep: 0, // the current animation step numSteps: 60, // default number of steps easing: ...
true
Other
chartjs
Chart.js
b92b256872e9d01ef56c9b8d4440cda784662fe0.json
Flatten animation object and fix callbacks Animation callbacks now receives `animationObject` directly with a reference on the associated chart (`animation.chart`), which deprecates `animation.animationObject` and `animation.chartInstance`. Also fix missing `onComplete` animation argument and make sure that an animati...
src/core/core.controller.js
@@ -445,36 +445,34 @@ module.exports = function(Chart) { } var animationOptions = me.options.animation; - var onComplete = function() { + var onComplete = function(animation) { plugins.notify(me, 'afterRender'); - var callback = animationOptions && animationOptions.onComplete; - if (callback &&...
true
Other
chartjs
Chart.js
b92b256872e9d01ef56c9b8d4440cda784662fe0.json
Flatten animation object and fix callbacks Animation callbacks now receives `animationObject` directly with a reference on the associated chart (`animation.chart`), which deprecates `animation.animationObject` and `animation.chartInstance`. Also fix missing `onComplete` animation argument and make sure that an animati...
src/core/core.helpers.js
@@ -957,9 +957,9 @@ module.exports = function(Chart) { return true; }; - helpers.callCallback = function(fn, args, _tArg) { + helpers.callback = function(fn, args, thisArg) { if (fn && typeof fn.call === 'function') { - fn.apply(_tArg, args); + fn.apply(thisArg, args); } }; helpers.getHoverColor = ...
true
Other
chartjs
Chart.js
b92b256872e9d01ef56c9b8d4440cda784662fe0.json
Flatten animation object and fix callbacks Animation callbacks now receives `animationObject` directly with a reference on the associated chart (`animation.chart`), which deprecates `animation.animationObject` and `animation.chartInstance`. Also fix missing `onComplete` animation argument and make sure that an animati...
src/core/core.scale.js
@@ -93,7 +93,7 @@ module.exports = function(Chart) { // Any function can be extended by the scale type beforeUpdate: function() { - helpers.callCallback(this.options.beforeUpdate, [this]); + helpers.callback(this.options.beforeUpdate, [this]); }, update: function(maxWidth, maxHeight, margins) { va...
true
Other
chartjs
Chart.js
b92b256872e9d01ef56c9b8d4440cda784662fe0.json
Flatten animation object and fix callbacks Animation callbacks now receives `animationObject` directly with a reference on the associated chart (`animation.chart`), which deprecates `animation.animationObject` and `animation.chartInstance`. Also fix missing `onComplete` animation argument and make sure that an animati...
test/global.deprecations.tests.js
@@ -39,6 +39,53 @@ describe('Deprecations', function() { expect(proxy.width).toBe(140); }); }); + + describe('Chart.Animation.animationObject', function() { + it('should be defined and an alias of Chart.Animation', function(done) { + var animation = null; + + acquireChart({ + options: { + ...
true
Other
chartjs
Chart.js
d25e7b1e1a250b225e6fb5a5fda3cf42153d3d93.json
Handle incoming model values on element transition If a value is set on the model after `pivot()` has been called, the view wasn't initialized and the animation started from 0. Now, `_start` and incomplete `_view` are initialized to the model value during the transition (no initial implicit transition). Also remove e...
package.json
@@ -46,7 +46,7 @@ "main": "Chart.js" }, "dependencies": { - "chartjs-color": "~2.0.0", + "chartjs-color": "^2.1.0", "moment": "^2.10.6" } }
true
Other
chartjs
Chart.js
d25e7b1e1a250b225e6fb5a5fda3cf42153d3d93.json
Handle incoming model values on element transition If a value is set on the model after `pivot()` has been called, the view wasn't initialized and the animation started from 0. Now, `_start` and incomplete `_view` are initialized to the model value during the transition (no initial implicit transition). Also remove e...
src/core/core.element.js
@@ -1,9 +1,60 @@ 'use strict'; +var color = require('chartjs-color'); + module.exports = function(Chart) { var helpers = Chart.helpers; + function interpolate(start, view, model, ease) { + var keys = Object.keys(model); + var i, ilen, key, actual, origin, target, type, c0, c1; + + for (i=0, ilen=keys.lengt...
true
Other
chartjs
Chart.js
d25e7b1e1a250b225e6fb5a5fda3cf42153d3d93.json
Handle incoming model values on element transition If a value is set on the model after `pivot()` has been called, the view wasn't initialized and the animation started from 0. Now, `_start` and incomplete `_view` are initialized to the model value during the transition (no initial implicit transition). Also remove e...
src/core/core.helpers.js
@@ -911,19 +911,21 @@ module.exports = function(Chart) { ctx.quadraticCurveTo(x, y, x + radius, y); ctx.closePath(); }; - helpers.color = function(c) { - if (!color) { + + helpers.color = !color? + function(value) { console.error('Color.js not found!'); - return c; - } + return value; + } : + funct...
true
Other
chartjs
Chart.js
d25e7b1e1a250b225e6fb5a5fda3cf42153d3d93.json
Handle incoming model values on element transition If a value is set on the model after `pivot()` has been called, the view wasn't initialized and the animation started from 0. Now, `_start` and incomplete `_view` are initialized to the model value during the transition (no initial implicit transition). Also remove e...
test/core.element.tests.js
@@ -16,11 +16,9 @@ describe('Core element tests', function() { // First transition clones model into view element.transition(0.25); - expect(element._view).toEqual(element._model); - expect(element._start).toEqual(element._model); // also cloned + expect(element._view).toEqual(element._model); expect(el...
true
Other
chartjs
Chart.js
b50eac366dbde8c376f9fddc104726936a720628.json
Add test for layout service weight ordering
test/core.layoutService.tests.js
@@ -390,4 +390,43 @@ describe('Test the layout service', function() { expect(chart.chartArea.top).toBeCloseToPixel(0); }); }); + + describe('ordering by weight', function() { + it('should keep higher weights outside', function() { + var chart = window.acquireChart({ + type: 'bar', + data: { + data...
false
Other
chartjs
Chart.js
2ddd5ff88c041042826f45382623bf4fc94db320.json
Fix use of reserved keyword as a parameter name
src/platforms/platform.dom.js
@@ -92,11 +92,11 @@ module.exports = function(Chart) { return canvas; } - function createEvent(type, chart, x, y, native) { + function createEvent(type, chart, x, y, nativeEvent) { return { type: type, chart: chart, - native: native || null, + native: nativeEvent || null, x: x !== undefined? x...
false
Other
chartjs
Chart.js
dfcf874735cb2cd7ed3e395ce66a6a89172c6d1c.json
Update initial sample with colours
docs/00-Getting-Started.md
@@ -84,7 +84,24 @@ var myChart = new Chart(ctx, { labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], datasets: [{ label: '# of Votes', - data: [12, 19, 3, 5, 2, 3] + data: [12, 19, 3, 5, 2, 3], + backgroundColor: [ + 'rgba(255, ...
false
Other
chartjs
Chart.js
966d7376171a6b398ae78812c89740af994c7417.json
Fix handling of moments by scale.getRightValue When using {x: moment, y: value} datapoints
src/core/core.scale.js
@@ -396,7 +396,7 @@ module.exports = function(Chart) { } // If it is in fact an object, dive in one more level if (typeof(rawValue) === "object") { - if (rawValue instanceof Date) { + if ((rawValue instanceof Date) || (rawValue.isValid)) { return rawValue; } else { return getRightValu...
false
Other
chartjs
Chart.js
529ebedc906d33af9fba44d8b642c6491fa7c852.json
Add BrowserStack mention to readme and website
README.md
@@ -31,6 +31,8 @@ For support using Chart.js, please post questions with the [`chartjs` tag on Sta ## Building and Testing `gulp build`, `gulp test` +Thanks to [BrowserStack](https://browserstack.com) for allowing our team to test on thousands of browsers. + ## License Chart.js is available under the [MIT licen...
true
Other
chartjs
Chart.js
529ebedc906d33af9fba44d8b642c6491fa7c852.json
Add BrowserStack mention to readme and website
docs/08-Notes.md
@@ -14,6 +14,8 @@ Chart.js offers support for all browsers where canvas is supported. Browser support for the canvas element is available in all modern & major mobile browsers <a href="http://caniuse.com/#feat=canvas" target="_blank">(http://caniuse.com/#feat=canvas)</a>. +Thanks to <a href="https://browserstack.c...
true
Other
chartjs
Chart.js
69521477a1f77c8c149c166c5c6b77a93bb3a009.json
Remove useless hasOwnProperty checks The Chart.helpers.each method uses Object.keys() to iterates on the object *own enumerable properties*, meaning that checking if object.hasOwnProperty() is useless.
src/core/core.element.js
@@ -39,7 +39,7 @@ module.exports = function(Chart) { helpers.each(this._model, function(value, key) { - if (key[0] === '_' || !this._model.hasOwnProperty(key)) { + if (key[0] === '_') { // Only non-underscored properties }
true
Other
chartjs
Chart.js
69521477a1f77c8c149c166c5c6b77a93bb3a009.json
Remove useless hasOwnProperty checks The Chart.helpers.each method uses Object.keys() to iterates on the object *own enumerable properties*, meaning that checking if object.hasOwnProperty() is useless.
src/core/core.helpers.js
@@ -35,14 +35,12 @@ module.exports = function(Chart) { helpers.clone = function(obj) { var objClone = {}; helpers.each(obj, function(value, key) { - if (obj.hasOwnProperty(key)) { - if (helpers.isArray(value)) { - objClone[key] = value.slice(0); - } else if (typeof value === 'object' && value !== nu...
true
Other
chartjs
Chart.js
974ff00464d7743182f842a2c7786c334b9ca82c.json
Fix syntax error in docs (#2572)
docs/00-Getting-Started.md
@@ -259,7 +259,7 @@ var img = new Image(); img.src = 'https://example.com/my_image.png'; img.onload = function() { var ctx = document.getElementById('canvas').getContext('2d'); - var fillPattern = ctx.CreatePattern(img, 'repeat'); + var fillPattern = ctx.createPattern(img, 'repeat'); var chart = new...
false
Other
chartjs
Chart.js
6bb6e5aa4b110bf4f084747691b145a1caefb63a.json
Improve tick width for vertical bars
src/controllers/controller.bar.js
@@ -120,7 +120,7 @@ module.exports = function(Chart) { // Appearance base: reset ? yScalePoint : this.calculateBarBase(this.index, index), - width: this.calculateBarWidth(numBars), + width: this.calculateBarWidth(index), backgroundColor: custom.backgroundColor ? custom.backgroundColor : help...
false
Other
chartjs
Chart.js
568c61c56d733a5cc66fd128d1559b6b3cd075e9.json
fix docs for tension
docs/00-Getting-Started.md
@@ -215,7 +215,7 @@ arc | Object | - | - *arc*.borderColor | Color | "#fff" | Default stroke color for arcs *arc*.borderWidth | Number | 2 | Default stroke width for arcs line | Object | - | - -*line*.lineTension | Number | 0.4 | Default bezier curve tension. Set to `0` for no bezier curves. +*line*.tension | Number...
false
Other
chartjs
Chart.js
2575ed0c1c7229afe01cb966ff715a791934abe8.json
Add issue & pull request template files (#2534)
.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,2 @@ +- [ ] I have read the [guidelines for contributing](https://github.com/chartjs/Chart.js/blob/master/CONTRIBUTING.md) +- [ ] I have included an example of my issue on a website such as [JS Bin](http://jsbin.com/), [JS Fiddle](http://jsfiddle.net/), or [Codepen](http://codepen.io/pen/). ([Template](http:...
true
Other
chartjs
Chart.js
2575ed0c1c7229afe01cb966ff715a791934abe8.json
Add issue & pull request template files (#2534)
.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,2 @@ +- [ ] I have read the [guidelines for contributing](https://github.com/chartjs/Chart.js/blob/master/CONTRIBUTING.md) +- [ ] I have included an example of my changes on a website such as [JS Bin](http://jsbin.com/), [JS Fiddle](http://jsfiddle.net/), or [Codepen](http://codepen.io/pen/). ([Template](htt...
true
Other
chartjs
Chart.js
691a7c6a4bef0c6e0b8d1c82bafd4e2807239fac.json
Update doc files for ticks.minRotation
docs/01-Scales.md
@@ -53,6 +53,7 @@ afterUpdate | Function | undefined | Callback that runs at the end of the update *ticks*.fontFamily | String | "Helvetica Neue" | Font family for the tick labels, follows CSS font-family options. *ticks*.fontSize | Number | 12 | Font size for the tick labels. *ticks*.fontStyle | String | "normal" |...
false
Other
chartjs
Chart.js
e519ea399d7e05b96fcfa2d8cbd295ad66690b8a.json
Fix color dependency for builds
package.json
@@ -46,7 +46,7 @@ "main": "Chart.js" }, "dependencies": { - "chartjs-color": "^2.0.0", + "chartjs-color": "~2.0.0", "moment": "^2.10.6" } }
false
Other
chartjs
Chart.js
4741c6f09da431e75fa860b4e08417a4d961fadf.json
Add new dataset update and draw plugin hooks In order to take full advantage of the new plugin hooks called before and after a dataset is drawn, all drawing operations must happen on stable meta data, so make sure that transitions are performed before.
.gitignore
@@ -9,4 +9,5 @@ .vscode bower.json +*.log *.swp
true
Other
chartjs
Chart.js
4741c6f09da431e75fa860b4e08417a4d961fadf.json
Add new dataset update and draw plugin hooks In order to take full advantage of the new plugin hooks called before and after a dataset is drawn, all drawing operations must happen on stable meta data, so make sure that transitions are performed before.
src/controllers/controller.bar.js
@@ -248,19 +248,20 @@ module.exports = function(Chart) { return yScale.getPixelForValue(value); }, - draw: function(ease) { + draw: function() { var me = this; var chart = me.chart; - var easingDecimal = ease || 1; - var metaData = me.getMeta().data; + var elements = me.getMeta().data; var ...
true
Other
chartjs
Chart.js
4741c6f09da431e75fa860b4e08417a4d961fadf.json
Add new dataset update and draw plugin hooks In order to take full advantage of the new plugin hooks called before and after a dataset is drawn, all drawing operations must happen on stable meta data, so make sure that transitions are performed before.
src/controllers/controller.line.js
@@ -280,29 +280,26 @@ module.exports = function(Chart) { } }, - draw: function(ease) { + draw: function() { var me = this; var chart = me.chart; var meta = me.getMeta(); var points = meta.data || []; - var easingDecimal = ease || 1; - var i, ilen; + var area = chart.chartArea; + var i...
true
Other
chartjs
Chart.js
4741c6f09da431e75fa860b4e08417a4d961fadf.json
Add new dataset update and draw plugin hooks In order to take full advantage of the new plugin hooks called before and after a dataset is drawn, all drawing operations must happen on stable meta data, so make sure that transitions are performed before.
src/controllers/controller.radar.js
@@ -134,24 +134,6 @@ module.exports = function(Chart) { }); }, - draw: function(ease) { - var meta = this.getMeta(); - var easingDecimal = ease || 1; - - // Transition Point Locations - helpers.each(meta.data, function(point) { - point.transition(easingDecimal); - }); - - // Transition and Draw...
true
Other
chartjs
Chart.js
4741c6f09da431e75fa860b4e08417a4d961fadf.json
Add new dataset update and draw plugin hooks In order to take full advantage of the new plugin hooks called before and after a dataset is drawn, all drawing operations must happen on stable meta data, so make sure that transitions are performed before.
src/core/core.controller.js
@@ -409,12 +409,34 @@ module.exports = function(Chart) { } for (var i = 0, ilen = me.data.datasets.length; i < ilen; ++i) { - me.getDatasetMeta(i).controller.update(); + me.updateDataset(i); } plugins.notify(me, 'afterDatasetsUpdate'); }, + /** + * Updates dataset at index unless a plu...
true
Other
chartjs
Chart.js
4741c6f09da431e75fa860b4e08417a4d961fadf.json
Add new dataset update and draw plugin hooks In order to take full advantage of the new plugin hooks called before and after a dataset is drawn, all drawing operations must happen on stable meta data, so make sure that transitions are performed before.
src/core/core.datasetController.js
@@ -208,12 +208,33 @@ module.exports = function(Chart) { update: helpers.noop, - draw: function(ease) { - var easingDecimal = ease || 1; - var i, len; - var metaData = this.getMeta().data; - for (i = 0, len = metaData.length; i < len; ++i) { - metaData[i].transition(easingDecimal).draw(); + transiti...
true
Other
chartjs
Chart.js
4741c6f09da431e75fa860b4e08417a4d961fadf.json
Add new dataset update and draw plugin hooks In order to take full advantage of the new plugin hooks called before and after a dataset is drawn, all drawing operations must happen on stable meta data, so make sure that transitions are performed before.
src/core/core.plugin.js
@@ -209,6 +209,27 @@ module.exports = function(Chart) { * @param {Object} options - The plugin options. * @since version 2.1.5 */ + /** + * @method IPlugin#beforeDatasetUpdate + * @desc Called before updating the `chart` dataset at the given `args.index`. If any plugin + * returns `false`, the datasets upd...
true
Other
chartjs
Chart.js
4741c6f09da431e75fa860b4e08417a4d961fadf.json
Add new dataset update and draw plugin hooks In order to take full advantage of the new plugin hooks called before and after a dataset is drawn, all drawing operations must happen on stable meta data, so make sure that transitions are performed before.
test/core.controller.tests.js
@@ -635,7 +635,7 @@ describe('Chart', function() { describe('plugin.extensions', function() { it ('should notify plugin in correct order', function(done) { - var plugin = this.plugin = {id: 'foobar'}; + var plugin = this.plugin = {}; var sequence = []; var hooks = { init: [ @@ -647,13 +647,17 @@...
true
Other
chartjs
Chart.js
9f3b51a80ce96578718267711e8b65c1ec8c25c1.json
Reuse parsed results rather than redoing work The input labels/data is converted into moments in `determineDataLimits`, reuse them instead of duplicating the work.
src/scales/scale.time.js
@@ -76,17 +76,6 @@ module.exports = function(Chart) { Chart.Scale.prototype.initialize.call(this); }, - getLabelMoment: function(datasetIndex, index) { - if (datasetIndex === null || index === null) { - return null; - } - - if (typeof this.labelMoments[datasetIndex] !== 'undefined') { - return thi...
true
Other
chartjs
Chart.js
9f3b51a80ce96578718267711e8b65c1ec8c25c1.json
Reuse parsed results rather than redoing work The input labels/data is converted into moments in `determineDataLimits`, reuse them instead of duplicating the work.
test/scale.time.tests.js
@@ -485,68 +485,4 @@ describe('Time scale tests', function() { threshold: 0.75 }); }); - - it('should not throw an error if the datasetIndex is out of bounds', function() { - var chart = window.acquireChart({ - type: 'line', - data: { - labels: ['2016-06-26'], - datasets: [{ - xAxisID: 'xScale0'...
true
Other
chartjs
Chart.js
8c90b9f2de6863cca3051276648e363aa332d6a2.json
Fix issue with how Chart.PluginBase is defined
src/chart.js
@@ -6,8 +6,8 @@ var Chart = require('./core/core.js')(); require('./core/core.helpers')(Chart); require('./platforms/platform.js')(Chart); require('./core/core.canvasHelpers')(Chart); -require('./core/core.plugin.js')(Chart); require('./core/core.element')(Chart); +require('./core/core.plugin.js')(Chart); require(...
true
Other
chartjs
Chart.js
8c90b9f2de6863cca3051276648e363aa332d6a2.json
Fix issue with how Chart.PluginBase is defined
src/core/core.plugin.js
@@ -321,5 +321,5 @@ module.exports = function(Chart) { * @todo remove at version 3 * @private */ - Chart.PluginBase = helpers.inherits({}); + Chart.PluginBase = Chart.Element.extend({}); };
true
Other
chartjs
Chart.js
7205ff5e2aa4515bae0c62bb9d8355745837270e.json
Replace `onEvent` by `before/afterEvent`
docs/09-Advanced.md
@@ -439,12 +439,9 @@ Plugins should implement the `IPlugin` interface: destroy: function(chartInstance) { } - /** - * Called when an event occurs on the chart - * @param e {Core.Event} the Chart.js wrapper around the native event. e.native is the original event - * @return {Boolean} true if the chart is change...
true
Other
chartjs
Chart.js
7205ff5e2aa4515bae0c62bb9d8355745837270e.json
Replace `onEvent` by `before/afterEvent`
src/core/core.controller.js
@@ -664,15 +664,19 @@ module.exports = function(Chart) { eventHandler: function(e) { var me = this; var tooltip = me.tooltip; - var hoverOptions = me.options.hover; + + if (plugins.notify(me, 'beforeEvent', [e]) === false) { + return; + } // Buffer any update calls so that renders do not occur...
true
Other
chartjs
Chart.js
7205ff5e2aa4515bae0c62bb9d8355745837270e.json
Replace `onEvent` by `before/afterEvent`
src/core/core.legend.js
@@ -526,7 +526,7 @@ module.exports = function(Chart) { delete chartInstance.legend; } }, - onEvent: function(chartInstance, e) { + afterEvent: function(chartInstance, e) { var legend = chartInstance.legend; if (legend) { legend.handleEvent(e);
true
Other
chartjs
Chart.js
7205ff5e2aa4515bae0c62bb9d8355745837270e.json
Replace `onEvent` by `before/afterEvent`
src/core/core.plugin.js
@@ -274,6 +274,22 @@ module.exports = function(Chart) { * @param {Number} easingValue - The current animation value, between 0.0 and 1.0. * @param {Object} options - The plugin options. */ + /** + * @method IPlugin#beforeEvent + * @desc Called before processing the specified `event`. If any plugin returns `...
true
Other
chartjs
Chart.js
7205ff5e2aa4515bae0c62bb9d8355745837270e.json
Replace `onEvent` by `before/afterEvent`
test/platform.dom.tests.js
@@ -320,7 +320,7 @@ describe('Platform.dom', function() { it('should notify plugins about events', function() { var notifiedEvent; var plugin = { - onEvent: function(chart, e) { + afterEvent: function(chart, e) { notifiedEvent = e; } };
true
Other
chartjs
Chart.js
1934358663ad16773082a44974da91f0be78b4e3.json
remove unnecessary extra init steps
src/core/core.controller.js
@@ -121,13 +121,9 @@ module.exports = function(Chart) { me.resize(true); } - // Make sure controllers are built first so that each dataset is bound to an axis before the scales - // are built + // Make sure scales have IDs and are built before we build any controllers. me.ensureScalesHaveIDs(); - ...
false
Other
chartjs
Chart.js
ceec907bee33d39da68cb7af111400622aefee23.json
Ignore .gitignore (and more) from Bower packages
gulpfile.js
@@ -71,7 +71,15 @@ function bowerTask() { homepage: package.homepage, license: package.license, version: package.version, - main: outDir + "Chart.js" + main: outDir + "Chart.js", + ignore: [ + '.github', + '.codeclimate.yml', + '.gitignore', + '.npmignore'...
false