Package Exports
- fusionmaps
- fusionmaps/maps/fusioncharts.usa
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fusionmaps) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
FusionMaps
Introduction
FusionMaps is a companion package meant to be used in conjunction with FusionCharts. By default, FusionCharts only includes definitions for two maps - the World map and the USA map.
This package contains the definition files for every map that can be rendered using FusionCharts.
Note: You'll have to first install FusionCharts in order to be able to render the maps available in this package. You can get the trial or the licensed version from the links given below:
- Download page: https://www.fusioncharts.com/download/
- Licensing: https://www.fusioncharts.com/buy/
Package Directory Structure
The FusionMaps package contains ES Modules for all map definitions under the fusionmaps/maps/es
directory. The UMD bundles for all map definitions are available at the root of the fusionmaps/maps
directory.
fusionmaps/
└── maps/
├── es
│ ├── fusioncharts.world.js
│ ├── fusioncharts.usa.js
│ ├── ...
│ └── fusioncharts.<MAP_ALIAS>.js
├── fusioncharts.world.js
├── fusioncharts.usa.js
├── ...
└── fusioncharts.<MAP_ALIAS>.js
Quick Start
Every map definition file name is in the format fusioncharts.<MAP_ALIAS>.js, where MAP_ALIAS gets replaced by the map’s JavaScript alias.
Therefore, assuming that you need to render the California map, the alias name california replaces the MAP_ALIAS in the format. Hence, the file name should be fusioncharts.california.js.
For a full list of aliases visit this link.
Using via npm
- Install the FusionCharts package.
`npm install fusioncharts`
- Install the FusionMaps package.
`npm install fusionmaps`
- Import FusionCharts core.
import FusionCharts from 'fusioncharts/core';
- Import the FusionCharts map renderer.
import Maps from 'fusioncharts/maps';
- Import the map definition you want to render.
import California from 'fusionmaps/maps/es/fusioncharts.california';
- Add the map renderer to FusionCharts.
FusionCharts.addDep(Maps);
- Add the map definition to FusionCharts.
FusionCharts.addDep(California);
- Instantiate and render your map.
var chart = new FusionCharts({
type: 'california',
renderAt: 'container'
});
chart.render();
For further reference:
- Official website: https://www.fusioncharts.com/
- Documentation: https://www.fusioncharts.com/dev/
- Support: https://www.fusioncharts.com/support/