I want to display some data about San Francisco using highmaps but there is no maps of the different neighborhoods in SF in the highmaps library so I found an geojson of San Francisco wich was validate by this site: geojson validator but when I use the highmaps validator he doesn't read it: the highmap validator
$('#run').click(function () {
var geojson = $.parseJSON($('#geojson').val());
// Initiate the chart
$('#container').slideDown().highcharts('Map', {
series: [{
mapData: geojson
}]
});
});
This is my geojson: pastebin code.
Do you know why it's not validated by highmaps but it's validate by the geojson validator? Or do you know a San Francisco map which will be validated by highmaps?
Consider importing your .geojson into QGis, then exporting it out again. In my experience any .geojson that QGis produces is usable by Highmaps. Also see this tutorial Creating custom geojson maps for Highmaps with QGis.
Related
When I set the credits.href option for a Highcharts chart, everything works well in the browser. The credits text is a clickable link.
However, if the chart is exported as a PDF, the credits text is not a link.
Here is my code:
let exportOptions = {
filename: filename,
fallbackToExportServer: false,
type: 'application/pdf'
};
let chartOptions= {
credits: {
enabled: true,
href: "http://example.com",
text: "TEMA-Q GmbH"
}
}
chart.exportChartLocal(exportOptions, chartOptions);
Am I doing something wrong or are credit urls simply not exported to PDF?
I am afraid that this functionality has not been implemented yet. I reported this idea on the Highcharts Github issue channel where you can follow and vote up this thread.
Link: https://github.com/highcharts/highcharts/issues/13594
How can I replace in this example the mapbox url with an external geojson file?
https://docs.mapbox.com/mapbox-gl-js/example/filter-features-within-map-view/
//'type': 'vector',
//'url': 'mapbox://mapbox.04w69w5j'
'type': 'geojson',
'url': 'mapbox://mapbox.04w69w5j'
});
and be able to filter it in the same way.
To use an external geojson file, in 'map.addSource' you need to replace 'url' with 'data'.
'type': 'geojson'
'data': 'yourfile.geojson'
Then in 'map.addLayer' remove the line
'source-layer': 'ne_10m_airports',
Here's an example how to plot the chart with json data
Is there a way to chart this from public data (meaning any listed company)? For example from bloomberg data? https://www.bloomberg.com/markets/chart/data/1D/AAPL:US
I guess the format is just wrong?
For Highcharts the structure of data is important, not the source. All you should do is set the correct link and series data, but unfortunately I see a problem with CORS: How does Access-Control-Allow-Origin header work?
series: [{
data: data.data_values,
...
}]
Live demo: http://jsfiddle.net/BlackLabel/5u0jv31y/
So I have the jquery-simple-rest plugin for Highcharts, (same used in the example documentation). I've linked the js file, and am not getting any errors in my browser. The documentation mentions also needing to the highed.use.
//The installer
highed.plugins.editor.install("jquery-simple-rest",{
//Contains information about the plugin - optional
meta:{
version:"1.0.0",
author:"Highsoft",
homepage:"https://github.com/highcharts/highcharts-editor/plugins/jquery-simple-rest.js"
},
//Add additional external dependencies here
dependencies:[
"https://code.jquery.com/jquery-3.1.0.min.js"
],
//This is the prototype options which the plugin accepts
options:{
url:{
required:!0,
type:"string"}
},
//Called when the chart changes
chartchange:function(e,t)
{jQuery.ajax({
url:t.url,
data:e.json,
dataType:"json",
type:"post"
,success:function(){
highed.snackBar("CHART SAVED")
},
error:function(e,t){
highed.snackBar("unable to save chart: "+t)
}
})
}
});
highed.plugins.editor.use('jquery-simple-rest', {options:{
url:{
required:!0,
type:"string"}
},
}
);
I can not get this plugin to appear in my the editor, and have no idea what it is I'm doing wrong.
link to example: https://github.com/highcharts/highcharts-editor/wiki/Plugins
I am using Highmaps and I have a map of the world with map markers all over. I want to show connection between map markers so I decided to use jsPlumb. I set an id to the highcharts data as so:
data: [{
id: "MT",
x: 907.49,
y: -1485.43
}
],
I tried to get the id defined here using javascript and it worked. jsPlumb requires id of an element both for the source and target, as so:
jsPlumb.connect({
source: 'MT',
target: 'GPin1',
anchors: [['Right'], ['Left']],
endpoint: ["Dot", {
radius: 0.1
}],
The problem is that jsPlumb does not recognize the id defined in highcharts and returns an error on console. How can I settle this any ideas please?