Server IP : 103.53.40.154 / Your IP : 18.224.52.54 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/ppcad7no/.quarantine/../agarsarbharat.com/js/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
// map js // Themes begin am4core.useTheme(am4themes_animated); // Themes end // Create map instance var chart = am4core.create("chartdiv", am4maps.MapChart); // Set map definition chart.geodata = am4geodata_india2019High; // Create map polygon series var polygonSeries = chart.series.push(new am4maps.MapPolygonSeries()); //Set min/max fill color for each area polygonSeries.heatRules.push({ property: "fill", target: polygonSeries.mapPolygons.template, min: chart.colors.getIndex(0).brighten(1), min: chart.colors.getIndex(1).brighten(0.3), // logarithmic: true // "min": am4core.color("#ffd7b1"), }); // Make map load polygon data (state shapes and names) from GeoJSON polygonSeries.useGeodata = true; // Set heatmap values for each state polygonSeries.data = [ { id: "IN-JK", value: 10 }, { id: "IN-MH", value: 12 }, { id: "IN-UP", value: 10 }, { id: "US-AR", value: 13 }, { id: "IN-RJ", value: 30 }, { id: "IN-AP", value: 40 }, { id: "IN-MP", value: 90 }, { id: "IN-TN", value: 40 }, { id: "IN-JH", value: 3 }, { id: "IN-WB", value: 0 }, { id: "IN-GJ", value: 0 }, { id: "IN-BR", value: 0 }, { id: "IN-TG", value: 0 }, { id: "IN-GA", value: 0 }, { id: "IN-DN", value: 0 }, { id: "IN-DL", value: 0 }, { id: "IN-DD", value: 0 }, { id: "IN-CH", value: 0 }, { id: "IN-CT", value: 0 }, { id: "IN-AS", value: 0 }, { id: "IN-AR", value: 0 }, { id: "IN-AN", value: 0 }, { id: "IN-KA", value: 0 }, { id: "IN-KL", value: 0 }, { id: "IN-OR", value: 0 }, { id: "IN-SK", value: 0 }, { id: "IN-HP", value:15 }, { id: "IN-PB", value: 14 }, { id: "IN-HR", value: 13 }, { id: "IN-UT", value: 12 }, { id: "IN-LK", value: 12 }, { id: "IN-MN", value: 5 }, { id: "IN-TR", value: 4 }, { id: "IN-MZ", value: 3 }, { id: "IN-NL", value: 2 }, { id: "IN-ML", value: 1 } ]; // Configure series tooltip var polygonTemplate = polygonSeries.mapPolygons.template; polygonTemplate.tooltipText = "{name}: {value}"; polygonTemplate.nonScalingStroke = true; polygonTemplate.strokeWidth = 0.5; // Create hover state and set alternative fill color var hs = polygonTemplate.states.create("hover"); hs.properties.fill = am4core.color("#ff7d01");