fusioncharts/fusioncharts-dist

Size of the bundle has grown to 1.3 MB

abhijeetkpawar opened this issue · 5 comments

https://bundlephobia.com/result?p=fusioncharts@3.15.1

Size of the fusioncharts npm bundle is 1.3MB due to which the whole application bundle has become very big.

@ayanonly1
Is this issue being considered?

https://bundlephobia.com/result?p=fusioncharts@3.15.1

Size of the fusioncharts npm bundle is 1.3MB due to which the whole application bundle has become very big.

To reduce the bundle size you can use modular ES6 approach and include those chart type files that you are looking to render, here is a link for reference - https://github.com/fusioncharts/fusioncharts-dist#using-fusioncharts-as-an-es-module

However, if you are still looking to reduce its size, you can use the concept like gzip on the compiler of your app, to make it more optimized - https://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/

Just started to test fusioncharts.

I am working on the react framework and import the chart modules as follows:

import FusionCharts, { ChartObject } from "fusioncharts";
import Area2D from "fusioncharts/fusioncharts.charts";
import FusionTheme from "fusioncharts/themes/fusioncharts.theme.fusion";
import { Component } from "react";
import ReactFC from "react-fusioncharts";

This generates me the following production bundle for the chart:

dist/assets/index.2ea6ad36.js    2626.49 KiB / gzip: 762.78 KiB

I think that 762kb is a bit too much for a chart. To understand if I do anything wrong, is there any overview of the bundle size or the size of the chars library?