Redash Chinese version supports a wide range of map styles, including various levels of 2D maps, 3D maps and other map styles. The common methods of adding map charts are described below.

1.Redash has built-in maps

The built-in map can be directly selected to use, can modify the color and other parameters, support the world map, dynamic selection of China geographic map, as well as each provincial map, the United States map and Japan map.



2. Customize json maps

If you upload a JSON file containing map data to a specified directory, you can choose to use it directly, and support dynamic selection of map files in the form of URL parameter p_adcode parameter value



3. Use echart map charts

Map of the World, Legendhttps://www.makeapie.com/edit…



Var myChart = echarts.init(Element); var myChart = echarts.init(element); var option; Option && mychart.setoption (option); Save to generate the following world map legend. For details about how to modify display and configuration items, see the Echart documentationhttps://echarts.apache.org/zh…



Map of Chinahttps://www.makeapie.com/edit…

$.get = d3.json; $.get = d3.text; $.get = d3.text;

Change the $(function(){}) method to (function(){}()), and do the same as adding the world map above.

In addition to the common flat map, Echart includes a number of 3D map styles, which can also be supported and used in Redash Chinese.



4. Plotly. Js map

Plotly.js also includes a lot of map styles, and redash Chinese version fully supports plotly. js, which is very easy to use.

Reference examples:https://plotly.com/javascript…



Simply copy the code into the Redash Custom code view and change the container name “myDiv” to Element.