score:2
The reason they are not working the same way is because you have to pass x and y coordinates when you use "mappoint".
Your "goblin" data:
{
"name": "Adam",
"x": 1751,
"y": -9500
}
Your "ghost" data (no "x" and "y"):
{
name: "Liège",
code: "SE",
z: 1
}
If you give the "ghost" data some "x" and "y" properties, it will work. Please see this example.
The other thing that you can try if you want to insert images into the map without specifying any "x" and "y" is to do it via the dataLabels. In this example here, I have created a map of the USA. Each state that has the population density smaller than 7 people per square metre will display a ghost. If you want to go this way, there are two properties that you need to use this way:
useHTML: true
so you can have HTML<img>
tags as data labels- use
formatter
instead offormat
, but please note you have to pass a function toformatter
var ghostElem = '<img src="https://cdn1.iconfinder.com/data/icons/Momentum_MatteEntireSet/32/ghost.png"/>';
dataLabels: {
enabled: true,
useHTML: true,
color: 'white',
formatter: function() { return (this.point.value <7)? ghostElem: null}
}
Source: stackoverflow.com
Related Query
- How do I show map points using country codes with Highmaps?
- How to make map with overlaid column charts using highmaps
- How to draw a bubble map with longitude and latitude using Highcharts in react
- How to insert overlay images in HighMaps (or HighCharts) which scale with the map
- How to show unique name of every points in highCharts using angular
- Coloring Country while showing mappoint for cities in world map using highmaps
- Custom map with Highmaps adding mappoint series in latitude and longitude using proj4js
- how to map serial and data points using json Array
- Highmaps country map not showing when using type: "mappoint"
- how to create a world map using highmaps and disable part of legend?
- How to show a column with the value Zero in Column chart in Highcharts?
- How to use Highmaps and Highcharts with Meteor?
- How to import Highmaps map collection in Angular 6
- How show all tooltips split in graph with many series
- How to grab correct highchart number in selectors using Selenium Webdriver with Python with several charts on the page?
- How to draw two lines in HighStocks using candlestick with intraday
- how to pass datalabels along with data to show it in tooltip in highchart
- How to show only weekday on xAxis with Highcharts?
- How to show multiple pie charts using highcharts
- How to read and insert correct highchart number in selectors using Selenium Webdriver with Python?
- How can I hide non-selected series and axes when using XY zoom with highcharts?
- How to make two charts using highchart show up in the same line side by side using div
- How can i add element with attributes to SVG using jquery
- how to show column and area charts with different y axis with same category and same x axis in highcharts
- How can I make milestone lines with a GANTT chart using the highcharts library?
- How to specify a range of data when using HighCharts with <table>?
- How to display percentage along with Count value in Pie chart Using Higcharts Plugin?
- How can I get a chart only with legends using highcharts
- how to show different colors for each grid line using highcharts?
- How to show/hide categories with checkbox using highcharts?
More Query from same tag
- Highcharts chart not displaying data from csv file
- How can I have both a legend and data labels, with different labels, in Highcharts?
- Stack area series on top of line series
- Wrong x-axis min max values Highcharts
- Highcharts - how to correctly align x-axis ticks when plotOptions.column.crisp set to false
- How to get number of pixels between two points in Highcharts?
- Manipulate PHP array to group small values for use in Pie Chart
- Highchart - change color of one x-axis label only
- Highstock. prevent gaps adding new line series
- Highcharts: how to get the data points in the zoomed window?
- JS value name and it's value
- controlling the resolution (dpi) of an exported JPG from highcharts exporting-server
- Highcharts, detect if point is first in stack
- Invalid argument line 80 in highcharts.js
- HighCharts Semi-Circle-Donut, remove margin and padding
- How to add data to a custom HighChart's HighMaps map? joinBy?
- Highcharts - SMA Indicator does not display
- Highcharts. Highlight line chart date interval on hover
- Highcharts Error #17 (Vue.js), in columnrange series
- High chart items missing in mobile view
- HighCharts - Single legend for two columns in a Stack Column chart
- Heatmap: Append new data rows
- Coloring a label depending on color of slice and using distance
- How to change the color of marker-points dynamically based on y-position
- Highcharts multiple data on single point in series
- Highchart Scrollbar position
- Control spacing and height between bars in Highcharts.js bar chart
- Incorrect values on Highcharts (compared to input)
- Position text and circle in Highcharts graph dynamically?
- Highchart guage needles showing below data labels