fusioncharts / angular4-fusioncharts

A simple and lightweight Angular 4 component which provides bindings for FusionCharts JavaScript Charting Library
MIT License
17 stars 7 forks source link

Chart type not Supported #19

Open vishals9711 opened 6 years ago

vishals9711 commented 6 years ago

Any PowerXT chart is not supported. I Have imported the powerChartXT library also. still, there is a problem with the chart

ayanbhaduryfc commented 6 years ago

Hi, You need to import the powerchart module and finally pass the dependency inside FusionCharts fc module, please check the sample for reference - https://plnkr.co/edit/6jBU7BwzE0kyiXTyxy0u?p=preview

vishals9711 commented 6 years ago

I have imported the following; //Charts import as FusionCharts from 'fusioncharts'; import as Charts from 'fusioncharts/fusioncharts.charts'; import as FintTheme from 'fusioncharts/themes/fusioncharts.theme.fint'; import { FusionChartsModule } from 'angular4-fusioncharts'; import as powerCharts from 'fusioncharts/fusioncharts.powercharts';

import * as OceanTheme from 'fusioncharts/themes/fusioncharts.theme.ocean';

FusionChartsModule.fcRoot(FusionCharts,powerCharts, Charts, FintTheme,OceanTheme);``

and my HTML page contains

<fusioncharts [width]="width" [height]="height" [type]='mssplinearea' [dataFormat]="dataFormat" [dataSource]="datasource">

Still, the webpage shows chart not supported also i have imported the script files in the HTML files

ayanbhaduryfc commented 6 years ago

Hi,

Please maintain the order to render a power chart you need to include fusioncharts, after that fusionchart.powercharts, then include the files, for rendering power charts fusioncharts.charts.js does not require, for reference please check the snippet below

import as FusionCharts from 'fusioncharts'; import as powercharts from 'fusioncharts/fusioncharts.powercharts'; import { FusionChartsModule } from 'angular4-fusioncharts'; import { AppComponent } from './app.component';

FusionChartsModule.fcRoot(FusionCharts, powercharts);