Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: reactchartjs/react-chartjs-2
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.0.5
Choose a base ref
...
head repository: reactchartjs/react-chartjs-2
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Mar 17, 2017

  1. Update README.md

    agamemnus authored Mar 17, 2017
    Copy the full SHA
    96aace6 View commit details

Commits on Mar 18, 2017

  1. Merge pull request #113 from agamemnus/patch-1

    Update README.md
    jerairrest authored Mar 18, 2017
    Copy the full SHA
    f87495e View commit details

Commits on May 7, 2017

  1. Rc 2.1.0 (#130)

    * add react-storybook
    
    * split stories into isolated includes (Sections)
    
    * added some more examples for mixed, and mixed multi-line
    
    * Provide a fix for #114 by determining which series to add/remove/update by a dataset key as opposed to array index. The dataset key is determined via a keyProvider function which defaults to dataset.label
    
    * replace Array.includes with Array.indexOf for backwards compatibility reasons
    
    * Added support for inline plugins (see chartjs@2.5.0) and modified mixed data example to include an example plugin
    
    * missing ref in shouldComponentUpdate
    
    * added latest storybook
    
    * updated README
    
    * Use prop-type package instead of React.PropType
    
    In 15.5, instead of accessing PropTypes from the main React object,
    install the prop-types package and import them from there.
    
    https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.proptypes
    
    * Fix lint test
    
    * fixed tests and added a graph
    jerairrest authored and gor181 committed May 7, 2017
    Copy the full SHA
    459504b View commit details

Commits on Jun 7, 2017

  1. Copy the full SHA
    3dfe3c8 View commit details

Commits on Jun 28, 2017

  1. Use cross-env to enable windows build

    acailly committed Jun 28, 2017
    Copy the full SHA
    37dbc1b View commit details
  2. Copy the full SHA
    ddc49a2 View commit details
  3. Merge branch 'windows-build' into enable-snapshot

    acailly committed Jun 28, 2017
    Copy the full SHA
    bfd868e View commit details

Commits on Jul 1, 2017

  1. Merge pull request #141 from acailly/windows-build

    Use cross-env to enable windows build
    jerairrest authored Jul 1, 2017
    Copy the full SHA
    15f1448 View commit details

Commits on Jul 3, 2017

  1. docs: address issue with multi-dataset charts - closes #154

    Kumar Harsh committed Jul 3, 2017
    Copy the full SHA
    e610d7e View commit details
  2. feat: support 'scatter' charts out-of-the-box

    Chartjs has default config for scatter charts which are different than line charts in four key areas:
      * x and y axis are both `linear`.
      * hover mode is `single`.
      * showLines is `false`.
      * tooltip title doesn't make sense, as both x and y are both values.
    
    Keeping in mind that this default config is already present within the base chartjs library, a different 'Scatter' chart should be exposed by this library - to avoid redundant configs to be written by each developer.
    Kumar Harsh committed Jul 3, 2017
    Copy the full SHA
    a711447 View commit details
  3. chore: fix editorconfig

    - all JS/JSON/yaml are already using spaces, so having indent-style as tab just confuses the editor.
    - only the README.md is using tabs for whitespace, for which a new rule is added
    Kumar Harsh committed Jul 3, 2017
    Copy the full SHA
    df43bab View commit details

Commits on Jul 7, 2017

  1. Changed PropType of type field to validate against current chart type…

    …s including extended ones
    BenLorantfy committed Jul 7, 2017
    Copy the full SHA
    9f19958 View commit details

Commits on Jul 9, 2017

  1. Merge pull request #157 from kumarharsh/feat/scatter

    Support 'scatter' charts out-of-the-box
    jerairrest authored Jul 9, 2017
    Copy the full SHA
    8c2abe0 View commit details
  2. Copy the full SHA
    a2ef4b0 View commit details
  3. Merge pull request #156 from kumarharsh/docs/154

    docs: address issue with multi-dataset charts - closes #154
    jerairrest authored Jul 9, 2017
    Copy the full SHA
    cd354e8 View commit details
  4. Merge pull request #159 from BenLorantfy/betterPropTypeForChartType

    Better PropType for type field
    jerairrest authored Jul 9, 2017
    Copy the full SHA
    f8f20be View commit details
  5. upgrade to 2.2.0

    jerairrest committed Jul 9, 2017
    Copy the full SHA
    9d2a8d8 View commit details

Commits on Jul 10, 2017

  1. bump version

    jerairrest committed Jul 10, 2017
    Copy the full SHA
    1f43809 View commit details
  2. add package.json

    jerairrest committed Jul 10, 2017
    Copy the full SHA
    fd5c5f3 View commit details

Commits on Jul 11, 2017

  1. Copy the full SHA
    a9b2d1c View commit details
  2. Merge pull request #152 from acailly/enable-snapshot

    Replaced findDomNode with ref in order to use react-test-renderer for snapshot testing with storybook
    jerairrest authored Jul 11, 2017
    Copy the full SHA
    aee5336 View commit details
  3. add command schedule

    jerairrest committed Jul 11, 2017
    Copy the full SHA
    8d8ec4c View commit details
  4. readded canvas to dev dep

    jerairrest committed Jul 11, 2017
    Copy the full SHA
    3a3323f View commit details

Commits on Jul 15, 2017

  1. Rc 2.5.0 (#163)

    * Add legend support to charts
    
    * added polyfill for find
    jerairrest authored Jul 15, 2017
    Copy the full SHA
    6e32667 View commit details
  2. Copy the full SHA
    928d8df View commit details

Commits on Jul 20, 2017

  1. Copy the full SHA
    fc5c640 View commit details
  2. build dist

    jerairrest committed Jul 20, 2017
    Copy the full SHA
    e37ea56 View commit details

Commits on Jul 21, 2017

  1. use lodash.find instead of MDN polyfill (#169)

    Nicee!!!!!!! Thanks so much!
    sleepylemur authored and jerairrest committed Jul 21, 2017
    Copy the full SHA
    7910017 View commit details
  2. Copy the full SHA
    1351743 View commit details

Commits on Jul 22, 2017

  1. added scatter to ts

    jerairrest committed Jul 22, 2017
    Copy the full SHA
    03d7709 View commit details

Commits on Aug 5, 2017

  1. Copy the full SHA
    63a3c22 View commit details

Commits on Aug 15, 2017

  1. Copy the full SHA
    c078387 View commit details
  2. Copy the full SHA
    c698b78 View commit details

Commits on Aug 18, 2017

  1. Copy the full SHA
    6a3ebd7 View commit details
  2. Copy the full SHA
    c1a1f2f View commit details
  3. Use rollup and babel to generate the builds

    Expose es6 build.
    tusbar committed Aug 18, 2017
    Copy the full SHA
    b94420d View commit details
  4. Build only on node 8 on travis

    This is a front-end library, no need to test on more versions.
    tusbar committed Aug 18, 2017
    Copy the full SHA
    ad60c47 View commit details
  5. Remove gulp scripts for examples and use webpack

    This drops a few scripts from package.json (mostly the publishing ones).
    tusbar committed Aug 18, 2017
    Copy the full SHA
    3554894 View commit details

Commits on Aug 19, 2017

  1. Merge pull request #182 from tusbar/rewrite-build-process

    Rewrite build process
    jerairrest authored Aug 19, 2017
    Copy the full SHA
    5ad3468 View commit details
  2. Use real lodash instead of custom builds

    Most people use lodash and not `lodash.isEqual` or `lodash.find`. They
    are custom builds of lodash, with a lot of duplicated code, and results
    in really heavy bundles.
    tusbar committed Aug 19, 2017
    Copy the full SHA
    6547e3b View commit details
  3. fix syntax err

    jerairrest committed Aug 19, 2017
    Copy the full SHA
    ce9e10b View commit details
  4. bump version

    jerairrest committed Aug 19, 2017
    Copy the full SHA
    b2a11f2 View commit details
  5. Merge pull request #181 from tusbar/lodash

    Use real lodash instead of custom `lodash.*` builds
    jerairrest authored Aug 19, 2017
    Copy the full SHA
    d7663f7 View commit details
  6. bump version

    jerairrest committed Aug 19, 2017
    Copy the full SHA
    0343e08 View commit details
  7. Update README.md

    jerairrest authored Aug 19, 2017
    Copy the full SHA
    0e24dab View commit details

Commits on Sep 3, 2017

  1. fix

    devdoomari committed Sep 3, 2017
    Copy the full SHA
    d6ac9ff View commit details

Commits on Sep 5, 2017

  1. Copy the full SHA
    cc85c71 View commit details
  2. Merge pull request #184 from devdoomari/fix-storybook-cannot-resolve-…

    …react-chartjs-2
    
    fix for storybook cannot resolve module react-chartjs-2
    jerairrest authored Sep 5, 2017
    Copy the full SHA
    dc3c3ed View commit details
  3. Merge pull request #187 from vijaysutrave/master

    Bump Chart.js version to 2.6.0
    jerairrest authored Sep 5, 2017
    Copy the full SHA
    529c73c View commit details
  4. bump version

    jerairrest committed Sep 5, 2017
    Copy the full SHA
    a4856f7 View commit details
Showing with 28,241 additions and 4,488 deletions.
  1. +0 −7 .babelrc
  2. +6 −0 .clean-publish
  3. +6 −0 .commitlintrc.json
  4. +3 −0 .czrc
  5. +1 −4 .editorconfig
  6. +0 −1 .eslintignore
  7. +0 −31 .eslintrc
  8. +47 −0 .eslintrc.json
  9. +56 −0 .github/ISSUE_TEMPLATE/bug-report.yml
  10. +9 −0 .github/ISSUE_TEMPLATE/config.yml
  11. +44 −0 .github/ISSUE_TEMPLATE/feature-request.yml
  12. +6 −0 .github/renovate.json
  13. +97 −0 .github/workflows/checks.yml
  14. +33 −0 .github/workflows/ci.yml
  15. +14 −0 .github/workflows/commit.yml
  16. +27 −0 .github/workflows/release.yml
  17. +50 −0 .github/workflows/website.yml
  18. +14 −26 .gitignore
  19. +3 −0 .nano-staged.json
  20. +0 −1 .npmignore
  21. +1 −0 .npmrc
  22. +9 −0 .prettierrc
  23. +5 −0 .simple-git-hooks.json
  24. +13 −0 .size-limit.json
  25. +25 −0 .storybook/main.js
  26. +8 −0 .storybook/manager.js
  27. +3 −0 .storybook/package.json
  28. +5 −0 .storybook/preview.js
  29. +7 −0 .storybook/theme.js
  30. +2 −0 .tool-versions
  31. +0 −16 .travis.yml
  32. +166 −0 CHANGELOG.md
  33. +7 −0 LICENSE
  34. +21 −0 LICENSE.md
  35. +48 −186 README.md
  36. +0 −29 bower.json
  37. +0 −2,346 dist/react-chartjs-2.js
  38. +0 −1 dist/react-chartjs-2.min.js
  39. +0 −5 example/src/.gitignore
  40. +0 −37 example/src/components/bar.js
  41. +0 −42 example/src/components/bubble.js
  42. +0 −36 example/src/components/doughnut.js
  43. +0 −50 example/src/components/dynamic-doughnut.js
  44. +0 −30 example/src/components/horizontalBar.js
  45. +0 −42 example/src/components/line.js
  46. +0 −96 example/src/components/mix.js
  47. +0 −36 example/src/components/pie.js
  48. +0 −42 example/src/components/polar.js
  49. +0 −41 example/src/components/radar.js
  50. +0 −80 example/src/components/randomizedLine.js
  51. +0 −47 example/src/example.js
  52. +0 −57 example/src/example.less
  53. +0 −22 example/src/index.html
  54. +0 −43 gulpfile.js
  55. +0 −21 index.d.ts
  56. +0 −488 lib/index.js
  57. +126 −57 package.json
  58. +10,436 −0 pnpm-lock.yaml
  59. +51 −0 rollup.config.js
  60. +73 −0 sandboxes/bar/grouped/App.tsx
  61. +11 −0 sandboxes/bar/grouped/index.html
  62. +7 −0 sandboxes/bar/grouped/index.tsx
  63. +21 −0 sandboxes/bar/grouped/package.json
  64. +6 −0 sandboxes/bar/grouped/vite.config.js
  65. +64 −0 sandboxes/bar/horizontal/App.tsx
  66. +11 −0 sandboxes/bar/horizontal/index.html
  67. +7 −0 sandboxes/bar/horizontal/index.tsx
  68. +21 −0 sandboxes/bar/horizontal/package.json
  69. +6 −0 sandboxes/bar/horizontal/vite.config.js
  70. +66 −0 sandboxes/bar/stacked/App.tsx
  71. +11 −0 sandboxes/bar/stacked/index.html
  72. +7 −0 sandboxes/bar/stacked/index.tsx
  73. +21 −0 sandboxes/bar/stacked/package.json
  74. +6 −0 sandboxes/bar/stacked/vite.config.js
  75. +56 −0 sandboxes/bar/vertical/App.tsx
  76. +11 −0 sandboxes/bar/vertical/index.html
  77. +7 −0 sandboxes/bar/vertical/index.tsx
  78. +21 −0 sandboxes/bar/vertical/package.json
  79. +6 −0 sandboxes/bar/vertical/vite.config.js
  80. +47 −0 sandboxes/bubble/default/App.tsx
  81. +11 −0 sandboxes/bubble/default/index.html
  82. +7 −0 sandboxes/bubble/default/index.tsx
  83. +21 −0 sandboxes/bubble/default/package.json
  84. +6 −0 sandboxes/bubble/default/vite.config.js
  85. +93 −0 sandboxes/chart/canvas/App.tsx
  86. +11 −0 sandboxes/chart/canvas/index.html
  87. +7 −0 sandboxes/chart/canvas/index.tsx
  88. +21 −0 sandboxes/chart/canvas/package.json
  89. +6 −0 sandboxes/chart/canvas/vite.config.js
  90. +115 −0 sandboxes/chart/events/App.tsx
  91. +11 −0 sandboxes/chart/events/index.html
  92. +7 −0 sandboxes/chart/events/index.tsx
  93. +21 −0 sandboxes/chart/events/package.json
  94. +6 −0 sandboxes/chart/events/vite.config.js
  95. +61 −0 sandboxes/chart/multitype/App.tsx
  96. +11 −0 sandboxes/chart/multitype/index.html
  97. +7 −0 sandboxes/chart/multitype/index.tsx
  98. +21 −0 sandboxes/chart/multitype/package.json
  99. +6 −0 sandboxes/chart/multitype/vite.config.js
  100. +98 −0 sandboxes/chart/ref/App.tsx
  101. +11 −0 sandboxes/chart/ref/index.html
  102. +7 −0 sandboxes/chart/ref/index.tsx
  103. +21 −0 sandboxes/chart/ref/package.json
  104. +6 −0 sandboxes/chart/ref/vite.config.js
  105. +36 −0 sandboxes/doughnut/default/App.tsx
  106. +11 −0 sandboxes/doughnut/default/index.html
  107. +7 −0 sandboxes/doughnut/default/index.tsx
  108. +21 −0 sandboxes/doughnut/default/package.json
  109. +6 −0 sandboxes/doughnut/default/vite.config.js
  110. +57 −0 sandboxes/line/area/App.tsx
  111. +11 −0 sandboxes/line/area/index.html
  112. +7 −0 sandboxes/line/area/index.tsx
  113. +21 −0 sandboxes/line/area/package.json
  114. +6 −0 sandboxes/line/area/vite.config.js
  115. +60 −0 sandboxes/line/default/App.tsx
  116. +11 −0 sandboxes/line/default/index.html
  117. +7 −0 sandboxes/line/default/index.tsx
  118. +21 −0 sandboxes/line/default/package.json
  119. +6 −0 sandboxes/line/default/vite.config.js
  120. +79 −0 sandboxes/line/multiaxis/App.tsx
  121. +11 −0 sandboxes/line/multiaxis/index.html
  122. +7 −0 sandboxes/line/multiaxis/index.tsx
  123. +21 −0 sandboxes/line/multiaxis/package.json
  124. +6 −0 sandboxes/line/multiaxis/vite.config.js
  125. +36 −0 sandboxes/pie/default/App.tsx
  126. +11 −0 sandboxes/pie/default/index.html
  127. +7 −0 sandboxes/pie/default/index.tsx
  128. +21 −0 sandboxes/pie/default/package.json
  129. +6 −0 sandboxes/pie/default/vite.config.js
  130. +34 −0 sandboxes/polarArea/default/App.tsx
  131. +11 −0 sandboxes/polarArea/default/index.html
  132. +7 −0 sandboxes/polarArea/default/index.tsx
  133. +21 −0 sandboxes/polarArea/default/package.json
  134. +6 −0 sandboxes/polarArea/default/vite.config.js
  135. +37 −0 sandboxes/radar/default/App.tsx
  136. +11 −0 sandboxes/radar/default/index.html
  137. +7 −0 sandboxes/radar/default/index.tsx
  138. +21 −0 sandboxes/radar/default/package.json
  139. +6 −0 sandboxes/radar/default/vite.config.js
  140. +38 −0 sandboxes/scatter/default/App.tsx
  141. +11 −0 sandboxes/scatter/default/index.html
  142. +7 −0 sandboxes/scatter/default/index.tsx
  143. +21 −0 sandboxes/scatter/default/package.json
  144. +6 −0 sandboxes/scatter/default/vite.config.js
  145. +10 −0 sandboxes/tsconfig.json
  146. +115 −0 src/chart.tsx
  147. +0 −316 src/index.js
  148. +8 −0 src/index.ts
  149. +59 −0 src/typedCharts.tsx
  150. +98 −0 src/types.ts
  151. +151 −0 src/utils.ts
  152. +47 −0 stories/Bar.stories.tsx
  153. +23 −0 stories/Bubble.stories.tsx
  154. +135 −0 stories/Chart.data.ts
  155. +209 −0 stories/Chart.stories.tsx
  156. +40 −0 stories/Doughnut.stories.tsx
  157. +31 −0 stories/Line.stories.tsx
  158. +64 −0 stories/Pie.stories.tsx
  159. +22 −0 stories/PolarArea.stories.tsx
  160. +22 −0 stories/Radar.stories.tsx
  161. +23 −0 stories/Scatter.stories.tsx
  162. +23 −0 stories/data.ts
  163. +5 −0 test/.eslintrc.json
  164. +0 −225 test/__tests__/Chart_spec.js
  165. +53 −0 test/chart.test-d.tsx
  166. +434 −0 test/chart.test.tsx
  167. +0 −27 test/config/setup.js
  168. +3 −0 test/setup.ts
  169. +37 −0 tsconfig.json
  170. +18 −0 vite.config.js
  171. +15 −0 website/.gitignore
  172. +1 −0 website/CNAME
  173. +33 −0 website/README.md
  174. +3 −0 website/babel.config.js
  175. +67 −0 website/docs/chartjs-v2.mdx
  176. +67 −0 website/docs/chartjs-v3.mdx
  177. +27 −0 website/docs/components/bar.mdx
  178. +27 −0 website/docs/components/bubble.mdx
  179. +28 −0 website/docs/components/chart.mdx
  180. +11 −0 website/docs/components/docs.js
  181. +27 −0 website/docs/components/doughnut.mdx
  182. +17 −0 website/docs/components/index.mdx
  183. +27 −0 website/docs/components/line.mdx
  184. +27 −0 website/docs/components/pie.mdx
  185. +27 −0 website/docs/components/polar-area.mdx
  186. +27 −0 website/docs/components/radar.mdx
  187. +27 −0 website/docs/components/scatter.mdx
  188. +8 −0 website/docs/docs.js
  189. +27 −0 website/docs/examples/area-chart.mdx
  190. +27 −0 website/docs/examples/bubble-chart.mdx
  191. +27 −0 website/docs/examples/chart-events.mdx
  192. +27 −0 website/docs/examples/chart-ref.mdx
  193. +19 −0 website/docs/examples/docs.js
  194. +27 −0 website/docs/examples/doughnut-chart.mdx
  195. +27 −0 website/docs/examples/gradient-chart.mdx
  196. +27 −0 website/docs/examples/grouped-bar-chart.mdx
  197. +27 −0 website/docs/examples/horizontal-bar-chart.mdx
  198. +17 −0 website/docs/examples/index.mdx
  199. +27 −0 website/docs/examples/line-chart.mdx
  200. +27 −0 website/docs/examples/multiaxis-line-chart.mdx
  201. +27 −0 website/docs/examples/multitype-chart.mdx
  202. +27 −0 website/docs/examples/pie-chart.mdx
  203. +27 −0 website/docs/examples/polar-area-chart.mdx
  204. +27 −0 website/docs/examples/radar-chart.mdx
  205. +27 −0 website/docs/examples/scatter-chart.mdx
  206. +27 −0 website/docs/examples/stacked-bar-chart.mdx
  207. +27 −0 website/docs/examples/vertical-bar-chart.mdx
  208. +26 −0 website/docs/faq/canvas-context.md
  209. +26 −0 website/docs/faq/chartjs-instance.md
  210. +35 −0 website/docs/faq/docs.js
  211. +7 −0 website/docs/faq/esm-only.md
  212. +19 −0 website/docs/faq/fill-property.md
  213. +17 −0 website/docs/faq/index.mdx
  214. +16 −0 website/docs/faq/maintain-aspect-ratio.md
  215. +19 −0 website/docs/faq/registered-element.md
  216. +19 −0 website/docs/faq/registered-scale.md
  217. +26 −0 website/docs/faq/typescript.md
  218. +9 −0 website/docs/faq/why-two.md
  219. +92 −0 website/docs/index.mdx
  220. +147 −0 website/docs/migration-to-v4.md
  221. +20 −0 website/docs/migration-to-v5.md
  222. +38 −0 website/docs/working-with-datasets.md
  223. +82 −0 website/docs/working-with-events.md
  224. +114 −0 website/docusaurus.config.js
  225. +53 −0 website/package.json
  226. +11,471 −0 website/pnpm-lock.yaml
  227. +64 −0 website/sidebars.js
  228. +23 −0 website/src/components/ContextProvider.tsx
  229. +70 −0 website/src/components/PropsTable.tsx
  230. +46 −0 website/src/css/custom.css
  231. 0 website/static/.nojekyll
  232. BIN website/static/img/favicon.ico
  233. +40 −0 website/static/img/logo.svg
  234. +7 −0 website/tsconfig.json
7 changes: 0 additions & 7 deletions .babelrc

This file was deleted.

6 changes: 6 additions & 0 deletions .clean-publish
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"withoutPublish": true,
"tempDir": "package",
"fields": ["tsd"],
"files": ["website"]
}
6 changes: 6 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"body-max-line-length": [0]
}
}
3 changes: 3 additions & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "@commitlint/cz-commitlint"
}
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -5,10 +5,7 @@ root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab

[*.json]
indent_style = space
indent_size = 2
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.publish/*
dist/*
example/dist/*
lib/*
node_modules/*
31 changes: 0 additions & 31 deletions .eslintrc

This file was deleted.

47 changes: 47 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"standard",
"standard-react",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"env": {
"browser": true
},
"parserOptions": {
"ecmaVersion": "latest",
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"curly": [2, "multi-line"],
"quotes": [2, "single", "avoid-escape"],
"react/display-name": 0,
"react/jsx-boolean-value": 1,
"jsx-quotes": [1, "prefer-single"],
"react/jsx-no-undef": 1,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-unknown-property": 1,
"react/prop-types": 0,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"semi": [2, "always"],
"strict": 0,
"no-use-before-define": 0,
"@typescript-eslint/no-use-before-define": 2,
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-import-type-side-effects": "error"
}
}
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "🐛 Bug Report"
description: "If something isn't working as expected."
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: Thanks for taking the time to file a bug report! Please fill out this form as completely as possible.

- type: markdown
attributes:
value: ⚠️ react-chartjs-2 is just the wrapper around Chart.js, so if you are experiencing an issue with charts rendering, please create a related issue in [Chart.js repository](https://github.com/chartjs/Chart.js/issues).

- type: checkboxes
id: input1
attributes:
label: Would you like to work on a fix?
options:
- label: Check this if you would like to implement a PR, we are more than happy to help you go through the process.

- type: textarea
attributes:
label: Current and expected behavior
description: A clear and concise description of what the library is doing and what you would expect.
validations:
required: true

- type: input
attributes:
label: Reproduction
description: |
Please provide issue reproduction.
You can give a link to a repository with the reproduction or make a fork of [this sandbox](https://codesandbox.io/s/github/reactchartjs/react-chartjs-2/tree/master/sandboxes/chart/ref) and reproduce the issue there.
validations:
required: true

- type: input
attributes:
label: chart.js version
description: Which version of `chart.js` are you using?
placeholder: v0.0.0
validations:
required: true

- type: input
attributes:
label: react-chartjs-2 version
description: Which version of `react-chartjs-2` are you using?
placeholder: v0.0.0
validations:
required: true

- type: textarea
attributes:
label: Possible solution
description: If you have suggestions on a fix for the bug.
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

blank_issues_enabled: false
contact_links:
- name: 🤔 Have a Question?
url: https://stackoverflow.com/questions/tagged/react-chartjs-2
about: Feel free to ask questions on Stack Overflow.
- name: 📊 Have a Problem With Chart.js?
url: https://github.com/chartjs/Chart.js/issues
about: react-chartjs-2 is just the wrapper around Chart.js, so if you are experiencing an issue with charts rendering, please create a related issue in Chart.js repository.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "🚀 Feature Request"
description: "I have a specific suggestion!"
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: Thanks for taking the time to suggest a new feature! Please fill out this form as completely as possible.

- type: markdown
attributes:
value: ⚠️ react-chartjs-2 is just the wrapper around Chart.js, so if you are experiencing an issue with charts rendering, please create a related issue in [Chart.js repository](https://github.com/chartjs/Chart.js/issues).

- type: checkboxes
id: input1
attributes:
label: Would you like to work on this feature?
options:
- label: Check this if you would like to implement a PR, we are more than happy to help you go through the process.

- type: textarea
attributes:
label: What problem are you trying to solve?
description: |
A concise description of what the problem is.
placeholder: |
I have an issue when [...]
validations:
required: true

- type: textarea
attributes:
label: Describe the solution you'd like
validations:
required: true

- type: textarea
attributes:
label: Describe alternatives you've considered

- type: textarea
attributes:
label: Documentation, Adoption, Migration Strategy
description: |
If you can, explain how users will be able to use this and how it might be documented. Maybe a mock-up?
6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"config:base",
":preserveSemverRanges"
]
}
97 changes: 97 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Checks
on:
pull_request:
branches:
- master
jobs:
size:
runs-on: ubuntu-latest
name: size-limit
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Check size
uses: andresz1/size-limit-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
typings:
runs-on: ubuntu-latest
name: typings
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Prebuild
run: pnpm build
- name: Check typings
if: success()
run: pnpm test:typings
storybook:
runs-on: ubuntu-latest
name: storybook
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Check storybook
run: pnpm build:storybook
editorconfig:
runs-on: ubuntu-latest
name: editorconfig
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Check editorconfig
uses: editorconfig-checker/action-editorconfig-checker@main
website:
runs-on: ubuntu-latest
name: website
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Install website dependencies
run: pnpm install
working-directory: ./website
- name: Check website
run: pnpm build
working-directory: ./website
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
name: Tests
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test
- name: Collect coverage
uses: codecov/codecov-action@v5
if: success()
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: true
14 changes: 14 additions & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Commit
on:
push:
jobs:
commitlint:
runs-on: ubuntu-latest
name: commitlint
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run commitlint
uses: wagoid/commitlint-github-action@v6
Loading