Open pwild opened 7 years ago
hi @pwild!
the same browser cross origin rules apply to cedar that apply everywhere else, but you have several different options...
var chart = new Cedar({
"type":"scatter",
"dataset":{
// another public service that doesn't support CORS
"url":"/proxy/proxy.ashx?http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Petroleum/KSPetro/MapServer/0"
}
});
if you'd like to learn more about the how's and why's of proxies, i've always liked the article below: https://developers.arcgis.com/javascript/3/jshelp/ags_proxy.html
for the maintainers,
since d3.xhr()
always makes a CORS request, a fallback JSONP GET
request would be pretty beneficial to users who aren't able to modernize the web servers they are charting content from.
http://stackoverflow.com/questions/10627703/d3-json-d3-xhr-and-cross-domain-problems
@jgravois Tots regarding d3.xhr()
. In fact with v1 we probably overhaul how we do requests in general.
Just trying to get started with the bar chart sample and get the No 'Access-Control-Allow-Origin' CORS error.
No chart displays, but I can browse to the response?
Thoughts?