The Geo Maps Live Charts control is really easy to customize, here is a collection of maps around the world, you can also create your own.
GeoMaps are alpha, and they should have more features, create a new issue in the github repo with your ideas.
Tools Required:
- Visual Studio 2010 or later version.
Steps to Follow:
- Create a new Windows Forms application project in Visual Studio.
- Go to the solution explorer and right click on the project file and click on Nuget Package Manager.
- Now Click on Browse Button and search for Live Charts and select the LiveCharts.WinForms and install it. Make sure you have internet connectivity on your PC.
- After successful installation of Live Charts, Rebuild your project or just press Ctrl+Shift+B.
- Now go to the onLoad event of your form and add the Following Code:
LiveCharts.WinForms.GeoMap geoMap = new LiveCharts.WinForms.GeoMap();
Dictionary<string, double> keyValues = new Dictionary<string, double>();
keyValues["CN"] = 81285;
keyValues["US"] = 75066;
keyValues["IT"] = 74384;
keyValues["ES"] = 56196;
keyValues["IR"] = 29046;
keyValues["FR"] = 25233;
keyValues["UK"] = 9849;
keyValues["CA"] = 3579;
keyValues["PK"] = 1179;
keyValues["IN"] = 719;
geoMap.HeatMap = keyValues;
geoMap.Source = $"{Application.StartupPath}\\World.xml";
this.Controls.Add(geoMap);
geoMap.Dock = DockStyle.Fill;
Now Just copy and paste the World.xml file into the project file from solution explorer.
Right click on the World.xml file and click on properties,
Change the Build Action Property to None and Copy to Output Directory to Copy Always.
Rebuild your solution file and try to Run the application.
Very informative Geo application. I am wondering if you can give us a tip tip to read or load XML or XLSX or CSV data to the geo map live chart.
Thanks in advance
alot of information thanks alot
Like!! I blog quite often and I genuinely thank you for your information. The article has truly peaked my interest.