<!DOCTYPE html>
<!--Instructions
* Save this file as index.html and upload to somewhere like Bitballoon.com. An example of this default file can be viewed at http://townmap.bitballoon.com/
* do a find/replace on "Your Town Name" and change it to whatever you'd like this page to be called
* do a find/replace on "Your Background Image here" to add a map background to the chart
* To rename a series, look for "series: [{name: 'Misc'," and change the name between the '' to the new name
* To change the coordinate boundaries of your map (the default goes from 1250,3000 -> 1750,3500) edit the xAxis and yAxis lines "Max" and "Min" numbers to be your corner boundaries
* Each category has examples for how to set a plot point
-->
Your Town Name
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
table, th, td {
text-align: left;
font-size: 12px;
width: 200px;
}
p {
position: absolute;
top: 400px;
left: 25px;
width: 150px;
font-size: 12px;
}
footer {
font-style: italic;
font-size: 12px;
color: rgb(0, 0, 0);
position: absolute;
top: 700px;
left: 25px;
width: 150px;
}
#townlist tr:nth-child(even), .spawnerlist tr:nth-child(even) {
background-color: #e5e5e5;
}
#townlist tr:nth-child(odd), .spawnerlist tr:nth-child(odd) {
background-color: #fcfcfc;
}
#townlist th, #townlist td, .spawnerlist th, .spawnerlist td {
padding-left: 5px;
padding-right: 5px;
text-align: left;
white-space: nowrap;
font-size: 1.25em;
}
#townlist th, .spawnerlist th {
background-color: #cccccc;
}
#townlist {
position: absolute;
top: 850px;
left: 20px;
margin-bottom: 500px;
border-collapse: collapse;
}
.search {
width: 350px;
}
.chartinfo th, .chartinfo td {
background-color: white;
font-size: 12px;
}
.chartinfo h3 {
text-align: center;
margin-bottom: 0;
padding: 5px 0;
font-size: 1.5em;
}
#container {
height: 700px;
width: 800px;
text-align: left;
margin: 100 20 20 20;
z-index: 20;
}
.spawnerlist {
position: absolute;
top: 158px;
left: 850px;
}
.spawnerlist th {text-align: center;}
.spawnerlist table {border-collapse: collapse;}
Highcharts.setOptions({lang: {thousandsSep: "",}});
Highcharts.chart('container', {
chart: {type: 'scatter',plotBorderWidth: 1,zoomType: 'xy', marginLeft: 200,plotBackgroundImage: 'Your Background Image here'},
legend: {enabled: true, layout: 'vertical',align: 'left',verticalAlign: 'top',floating: true,y:40,x:-20, footer: {text: 'Click and drag to select an area to zoom'},title: {text: 'Categories',style: {fontStyle: 'italic'}},},
title: {text: 'Your Town Name'},
xAxis:{gridLineWidth:1,max:1750,min:1250,tickInterval:50,title:{text:''},labels:{format:'{value}'},plotLines:[{color:'gray',dashStyle:'dot',width:2,tickAmount:5,value:0,label:{rotation:0,y:0,style:{fontStyle:'italic'},},zIndex:3}]},
yAxis:{startOnTick:false,endOnTick:false,reversed:true,tickInterval:50,max:3500,min:3000,title:{text:''},labels:{format:'{value}'},maxPadding:0.2,plotLines:[{color:'gray',dashStyle:'dot',tickAmount:5,width:2,value:0,label:{align:'right',style:{fontStyle:'italic'},x:0},zIndex:3}]},
plotOptions:{series:{dataLabels:{enabled:true,format:'{point.name}',},stickyTracking:false,},tooltip:{snap:0}},
credits: {href: "http://nerd.nu", text: "Your Town Name" },
tooltip: {
useHTML: true,
headerFormat: '
<table class="chartinfo">',
pointFormat: '
<tr><th colspan="2"><h3>{point.name}
</h3></th></tr>' +
'
<tr><th>Coordinates:
</th><td>{point.x},{point.y}
</td></tr>' +
'
<tr><th colspan=2><img src="{point.Img}" style="height:100%;"></th></tr>',
footerFormat: '
</table>',
followPointer: false,
hideDelay: 30,
},
series: [{
name: 'Misc',
color: 'rgba(0,53,255, 0.5)',
marker: {symbol: 'circle'},
data: [
//{x: 1425, y: 3275, name: 'Storage/Farms', Img: 'https://i.imgur.com/zWineuQ.png',}, //Example for formatting: Place point with image
//{x: 1626, y: 3394, name: 'Guardian Grinder',}, ////Example for formatting: Place point without image
]
}, {
name: 'Roads',
color: 'rgba(255,165,0, 1)',
lineWidth:2,
dataLabels: {enabled: false,},
enableMouseTracking: false,
marker: {enabled: false,},
data: [
//[1500,3000],[1500,3250],null, //Example for formatting: roads
]
}, {
name: 'Rails',
color: 'rgba(0,0,255, 1)',
dashStyle: 'ShortDot',
lineWidth:2,
dashStyle: 'ShortDot',
dataLabels: {enabled: false,},
enableMouseTracking: false,
marker: {enabled: false,},
data: [
//[1500,3000],[1500,3250],null, //Example for formatting: rails
]
}, {
name: 'Border',
color: 'rgba(255,0,0, .8)',
lineWidth:1,
dataLabels: {enabled: false,},
enableMouseTracking: false,
marker: {enabled: false,},
data: [
//[1250,3000],[1750,3000],[1750,3500],[1250,3500],[1250,3000],null, //Example for formatting: claim borders
]
}]
});