Highchart - The expected type comes from property 'dashStyle' which is declared here on type 'XAxisPlotLinesOptions'

Viewed 339

I have added the below code in the xAxis in the highchart.

plotLines: [
    {
      color: 'grey',
      width: 2,
      dashStyle: 'line'
    }
],

I am getting the below chart, previously I used the dashStyle in other work, here only I am getting the below issue.

error TS2769: No overload matches this call.
      Overload 1 of 2, '(options: Options, callback?: ChartCallbackFunction): Chart', gave the following error.
        Type '"trgt-testcntrl"' has no properties in common with type 'Options'.
      Overload 2 of 2, '(renderTo: string | HTMLElement, options: Options, callback?: ChartCallbackFunction): Chart', gave the following error.
        Type '"line"' is not assignable to type 'DashStyleValue'.

node_modules/highcharts/highcharts.d.ts:115249:5
        115249     dashStyle?: DashStyleValue;
                   ~~~~~~~~~
        The expected type comes from property 'dashStyle' which is declared here on type 'XAxisPlotLinesOptions'

What I am doing wrong here?

1 Answers
Related