NativeScript / nativescript-ui-charts

NativeScript wrapper around HiCharts library
Apache License 2.0
26 stars 6 forks source link

Area chart linear gradient not works #40

Open ymdm5 opened 2 years ago

ymdm5 commented 2 years ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Describe the steps to reproduce it. ns create charts cd charts ns plugin add @nativescript/ui-charts I created chart component that include an area chart with options below: chartOptions = { chart: { type: "area", }, title: { text: "", }, exporting: { enabled: false, }, yAxis: { title: { text: "", }, }, xAxis: { categories: ["2021.10", "2021.11", "2021.12", "2022.01", "2022.02"], }, legend: { enabled: false, }, credits: { enabled: false, }, plotOptions: { area: { fillColor: { linearGradient: [0, 0, 0, 300], stops: [ [0, "red"], [1, "yellow"], ], }, }, }, series: [ { name: "Installation", data: [10, 25, 13, 18, 21], }, ], };

Result:

JS: ERROR Error: java.lang.Exception: Failed resolving constructor for class 'com.highsoft.highcharts.common.HIGradient' with 4 parameters. Check the number and type of arguments. JS: Primitive types need to be manually wrapped in their respective Object wrappers. JS: If you are creating an instance of an inner class, make sure to always provide reference to the outerthisas the first argument.

Is there any code involved?

chart.zip