GithubHelp home page GithubHelp logo

fusioncharts / fusionmaps-dist Goto Github PK

View Code? Open in Web Editor NEW
8.0 7.0 5.0 246.96 MB

Data-driven maps in JavaScript from FusionMaps (FusionCharts). Over 1,400+ maps of all countries, regions, counties etc.

Home Page: https://www.fusioncharts.com/explore/chart-gallery?product=fusionmaps

JavaScript 100.00%
maps choropleth-maps js-maps fusioncharts fusionmaps javascript-maps data-driven-maps us-dma-map usa-color-coded-map usa-states-map

fusionmaps-dist's Introduction

FusionMaps is a companion package meant to be used in conjunction with FusionCharts to render data-driven maps (over 2,000+ maps for different continents, countries, states & regions). This package contains choropleth maps that can render on both desktop & mobile, with extended functionality like city or location markers, annotations, events etc.

This package contains definition files for all the maps. Map definition files are the path files required by FusionMaps to plot a map for a particular region. Each map has its own path file. By default, FusionCharts package only includes definition files for two maps - the World map and the USA map.

What's New in FusionMaps 3.23.0

Improvements

  • The rendering issues of Japan's 16 provinces were resolved. These provinces include Yamagata, Tochigi, Saitama, Tokyo, Toyama, Yamanashi, Shizuoka, Shiga, Wakayama, Tottori, Shimane, Okayama, Yamaguchi, Tokushima, Saga, and Okinawa.
  • Fixed the issue where certain values skewed the Radial bar
  • Two additional provinces were incorporated into Costa Rica maps: Monteverde and Puerto Jimenez


Table of Contents

Installing FusionMaps

There are multiple ways to install FusionMaps. For general instructions, refer to this developer docs page.

Direct Download You can download zipped version here.

Using CDN Instead of downloading, you can also use FusionCharts’s CDN to access map definition files directly. See below for details

<script src="https://cdn.fusioncharts.com/fusioncharts/latest/maps/<MAP_ALIAS>.js"></script>

MAP_ALIAS is the name of the map that you're plotting, used by FusionMaps. For each map, FusionMaps has a different JavaScript alias. e.g., World Map is world etc.

Install from NPM

npm install --save fusionmaps

You will also need FusionCharts package installed on your system to use maps. You can install the same using below command

npm install --save fusioncharts

See npm documentation to know more about npm usage.

Getting Started

Easiest way to render map is to include the FusionCharts JavaScript library files and map definition file in your webpage, create <div> container and chart instance, configure the data and render. Check this HTML snippet below:

<!DOCTYPE html>
<html>
  <head>
    <script src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script>
    <script src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.maps.js"></script>
    <script src="https://cdn.fusioncharts.com/fusioncharts/latest/maps/fusioncharts.world.js"></script>
    <script src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.fusion.js"></script>
  </head>
  <body>
    <div id="chart-container"></div>
    <script>
      FusionCharts.ready(function () {
        // chart instance
        var chart = new FusionCharts({
          type: "world",
          renderAt: "chart-container", // container where chart will render
          width: "600",
          height: "400",
          dataFormat: "json",
          dataSource: {
            chart: {
              caption: "Average Annual Population Growth",
              subcaption: " 1955-2015",
              numbersuffix: "%",
              includevalueinlabels: "1",
              labelsepchar: ": ",
              entityFillHoverColor: "#FFF9C4",
              theme: "fusion",
            },
            data: [
              { id: "NA", value: ".82", showLabel: "1" },
              { id: "SA", value: "2.04", showLabel: "1" },
              { id: "AS", value: "1.78", showLabel: "1" },
              { id: "EU", value: ".40", showLabel: "1" },
              { id: "AF", value: "2.58", showLabel: "1" },
              { id: "AU", value: "1.30", showLabel: "1" },
            ],
          },
        }).render();
      });
    </script>
  </body>
</html>

As you can see in above example, each continent is referenced using an ID. Each map in FusionMaps has its own regions, each of which have its own ID and name. These are present in specification sheets for the map. You can find specification sheets for all maps here.

Learn more through resources below:

Using FusionMaps as an ES Module

FusionMaps can be loaded as an ES module via transpilers.

The following examples presumes you are using npm to install FusionCharts and FusionMaps, see Installing FusionMaps for more details.

import FusionCharts from 'fusioncharts/core';
import Maps from 'fusioncharts/maps';

// include map definition file from maps/es folder - import mapName from fusionmaps/maps/es/<MAP_ALIAS>
import World from fusionmaps/maps/es/world

// add chart as dependency - FusionCharts.addDep(ChartType);
FusionCharts.addDep(Maps);
FusionCharts.addDep(World);

// instantiate the chart.
var chart = new FusionCharts({
  type: "world",
  renderAt: "chart-container", // container where chart will render
  width: "600",
  height: "400",
  dataFormat: "json",
  dataSource: {
    "chart": {
      "caption": "Average Annual Population Growth",
      "subcaption": " 1955-2015",
      "numbersuffix": "%",
      "includevalueinlabels": "1",
      "labelsepchar": ": ",
      "entityFillHoverColor": "#FFF9C4"
    },
    "data": [
      { "id": "NA", "value": ".82", "showLabel": "1" },
      { "id": "SA", "value": "2.04", "showLabel": "1" },
      { "id": "AS", "value": "1.78", "showLabel": "1" },
      { "id": "EU", "value": ".40", "showLabel": "1" },
      { "id": "AF", "value": "2.58", "showLabel": "1" },
      { "id": "AU", "value": "1.30", "showLabel": "1" }
    ]
  }
});

// render the chart
chart.render();

Related Packages

Front-end Integrations to help you easily integrate FusionCharts Suite in your projects/apps

AngularJS (1.x and above) Github Repo Documentation
Angular (2.x and above) Github Repo Documentation
jQuery Github Repo Documentation
React Github Repo Documentation
Vue.js Github Repo Documentation

Back-end Integrations to help you easily integrate FusionCharts Suite in your projects/apps

ASP.NET (C#) Github Repo Documentation
ASP.NET (VB) Github Repo Documentation
Java (JSP) Github Repo Documentation
Django Github Repo Documentation
PHP Github Repo Documentation
Ruby on Rails Github Repo Documentation

Contact Support

Fill this form or drop an email to [[email protected]](mailto: [email protected])

Folder Structure

fusionmaps/
└── maps/
    ├── es
    │   ├── fusioncharts.world.js
    │   ├── fusioncharts.usa.js
    │   ├── ...
    │   └── fusioncharts.<MAP_ALIAS>.js
    ├── fusioncharts.world.js
    ├── fusioncharts.usa.js
    ├── ...
    └── fusioncharts.<MAP_ALIAS>.js

fusionmaps-dist's People

Contributors

ayanonly1 avatar meherhowji-5740 avatar rohitkr avatar sanjaybhan avatar siawo avatar sikrigagan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fusionmaps-dist's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.