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

Add chartjs-plugin-crosshair after > v1.2.0 released with fixes #141

Open
1 task
DaveSkender opened this issue Sep 25, 2021 · 2 comments · May be fixed by #178
Open
1 task

Add chartjs-plugin-crosshair after > v1.2.0 released with fixes #141

DaveSkender opened this issue Sep 25, 2021 · 2 comments · May be fixed by #178
Assignees
Labels
enhancement New feature or request

Comments

@DaveSkender
Copy link
Member

DaveSkender commented Sep 25, 2021

When upgrading to chart.js v3, the chartjs-plugin-crosshair plugin did not work. Subsequent upgrades to the plugin by the author (v1.2.0) did not seem to resolve all issues related to using Angular build with Typescript.

I have not been able to get it to work and suspect it would require substantial effort to workaround issues. Wait for further plugin updates before trying to re-implement.

Error: src/app/chart/chart.service.ts:36:21 - error TS2322: Type '{ title: { font: { family: string; }; display: false; }; legend: { display: false; }; tooltip: { enabled: true; mode: "index"; intersect: false; }; crosshair: any; }' is not assignable to type '_DeepPartialObject<PluginOptionsByType<keyof ChartTypeRegistry>>'.
  Object literal may only specify known properties, and 'crosshair' does not exist in type '_DeepPartialObject<PluginOptionsByType<keyof ChartTypeRegistry>>'.

 options: {
   plugins: {
      ...
      crosshair: {...}
   } }

  node_modules/chart.js/types/index.esm.d.ts:2717:3
    2717   plugins: PluginOptionsByType<TType>;
           ~~~~~~~
    The expected type comes from property 'plugins' which is declared here on type '_DeepPartialObject<CoreChartOptions<keyof ChartTypeRegistry> & ElementChartOptions<keyof ChartTypeRegistry> & PluginChartOptions<...> & DatasetChartOptions<...> & ScaleChartOptions<...>>'
@DaveSkender DaveSkender added the bug Something isn't working label Sep 25, 2021
@DaveSkender DaveSkender mentioned this issue Sep 25, 2021
1 task
@DaveSkender DaveSkender added the on hold Waiting for a dependency label Dec 27, 2021
@DaveSkender DaveSkender linked a pull request Jan 16, 2022 that will close this issue
3 tasks
@DaveSkender
Copy link
Member Author

Not getting much support from the author of this plugin to fix anything. It does not work, even after overriding or adding missing typings.

@DaveSkender DaveSkender removed the bug Something isn't working label Feb 16, 2022
@DaveSkender DaveSkender changed the title Add back chartjs-plugin-crosshair after > v1.2.0 released with fixes Add chartjs-plugin-crosshair after > v1.2.0 released with fixes Feb 16, 2022
@DaveSkender
Copy link
Member Author

@DaveSkender DaveSkender removed the on hold Waiting for a dependency label Aug 31, 2023
@DaveSkender DaveSkender added the enhancement New feature or request label Oct 12, 2023
@DaveSkender DaveSkender self-assigned this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

1 participant