0

I am a beginner at developing with Angular.

I'm using amcharts5 for one of my projects, and I seem to be in a bit of a bind.

Referring to their example, I tried making the XY chart with different column colours, where they use the following function to implement that: I found an example where it's used like this:

series.columns.template.adapters.add('fill', (fill, target) => {
  return chart.get('colors').getIndex(series.columns.indexOf(target));
});

Using this approach I do get the result correctly, but my code editor shows the following error: Argument of type "O" is not assignable to parameter of type "RoundedRectangle".

Could anyone help me understand what I'm doing wrong? Maybe this is a TSLint issue and not really an error? (Though ng serve does seem to complain about it as well).

Thank you.

Precigus
  • 1
  • 3

1 Answers1

0

I had the same problem, and as workaround i applied a solution found to this question: simply cast target to any

series.columns.template.adapters.add("fill", function (fill, target:any) {
  return chart.get("colors").getIndex(series.columns.indexOf(target));
});
GiuServ
  • 1,215
  • 1
  • 13
  • 33