NativeScript / nativescript-ui-charts

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

Using option "dataLabels" crash the iOS app #33

Closed OPADA-Eng closed 1 year ago

OPADA-Eng commented 2 years ago

Hi, Thank you for the efforts in this plugin it's awesome! I have a problem in setting option dataLabels which when I set the app is crashing without any error in the console. in Android getting this error message: Handler for style HIStyle not implemented I'm using this sample code

public factoriesChartViewLoaded(args) {
    this.factoriesChartView = args.object

    this.factoriesChartView.setOptions({
         chart: {
        type: 'column'
    },
    series: [
        {
            name:'totals',
            color: "#000000",
            data: [23,33,23,22,11],
            dataLabels: {
                enabled: true,
                rotation: -90,
                color: '#FFFFFF',
            }
        },
       ]
   });

}

Which platform(s) does your issue occur on?

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

  1. create a new app
  2. install the plugin.
  3. set the code I have used with the attributes.
  4. run the app.

Is there any code involved?

testApp.zip

Ombuweb commented 1 year ago

For anyone who may struggle with this. The right place to set dataLabels is in the plotOptions option of the chart options object, as follows :

plotOptions: {
    series: {
      dataLabels: {
        enabled: true,
      },
    },
  }

See the examples under Try it here

OPADA-Eng commented 1 year ago

Thanks @Ombuweb