Skip to content

DecimationAlgorithm enum not found #8993

@Nico-DF

Description

@Nico-DF

Expected Behavior

I am no pro at Angular/JS, but by seeing the d.ts file and how the decimationOptions are defined, I expect the DecimationAlgorithm enum to be exported

export declare enum DecimationAlgorithm {
  lttb = 'lttb',
  minmax = 'min-max',
}

And that, when declaring options, I can use the following:

plugins: {
  decimation: {
    enabled: true,
    algorithm: DecimationAlgorithm.lttb
  }
}

Current Behavior

https://codepen.io/Nico-DF/pen/WNRWJQr

"export 'DecimationAlgorithm' was not found in 'chart.js'
error Command failed with exit code 1.

Maybe it is a misunderstanding on my side, but currently, I'm forced to do the following:

plugins: {
  decimation: {
    enabled: true,
    // @ts-ignore
    algorithm: 'lttb'
  }
}

The ts-ignore is needed due to the definition of the option

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions