# echarts-countries-js

[![npm version](https://badge.fury.io/js/echarts-countries-js.svg)](https://badge.fury.io/js/echarts-countries-js)

It collects all geo-jsons in javascript of {{num_cities}} countries and regions
and acts as a static asset to jupyter-echarts or your echarts collection.

## Installation

```
npm i echarts-countries-js
```

This library will be included in [pyecharts](https://github.com/chenjiandongx/pyecharts). No action is required from pyecharts user.

## echarts usage

```
<html>
  <head>
    <meta charset="utf-8" />
	<style>
	  .citymap{
	  width: 100%;
	  height: 100%;
	  }
	</style>
  	<script src="https://pyecharts.github.io/echarts-countries-js/echarts.min.js"></script>
	<script src="https://pyecharts.github.io/echarts-countries-js/dist/France.js"></script>
  </head>
  <body>
	<div id='france' class='citymap'></div>
	<script src='https://pyecharts.github.io/echarts-countries-js/demo.js'></script>
	<script>
	  make_map('法国', 'france');
	</script>
  </body>
</html>
```

![Usage with echarts](https://pyecharts.github.io/echarts-countries-js/France.png)

## Featuring Cities(or for Single Download)

Cities:
{% for english_name, chinese_name in countries %}
1. [{{chinese_name}}](https://pyecharts.github.io/echarts-countries-js/dist/{{english_name|replace(' ', '_', 'g')}}.js) ({{english_name}}) {% endfor %}


## Development

```shell
$ npm install
$ gulp
```

## Credit and geojson source

[pissang](https://github.com/pissang) and his [starbucks](https://github.com/pissang/starbucks) project.

## License

Unlicense. No guarantee, no liability and no politics provided. You use it at your own risk.