Comments (6)
Well, I'm not sure about qt, but Chrome will never allow exporting the image when loaded locally. We're not aware of any workarounds, I'm afraid. Maybe it's not Chrome or qt, maybe it's the restriction of the rendering engine. I wish there was something more that we could do for you.
from amcharts3.
This error means that you have an image loaded from different host than the web page itself ("tainted") OR you are loading this web page directly from the file system (file:///). Try loading it through web server. If the issue still persists, make sure that amCharts libraries are loaded from the same host as the web page displaying the chart itself.
from amcharts3.
Yes, I load the web-page directly from a file system. Actually, I'd like to embed amcharts into a native c++ app for graph visualization, that's why I'm looking for a solution without a web-server. Are there any options for this?
from amcharts3.
That won't work I'm afraid, due to aforementioned browser security restrictions.
In this case you will need to embed your data as a JavaScript (JSON) code along the chart code.
I.e.:
var chartData = [{
"category": "1",
"value": 100
}, {
"category": "2",
"value": 110
}];
AmCharts.makeChart("chartdiv", {
// ...
"dataProvider": chartData,
// ...
});
I hope this helps.
from amcharts3.
Yep, this is what I do, and everything works fine except the export plugin. I use qt webkit for html rendering, and I changed all its default security settings to allow working with local files, but it still gives me this security error.
Sorry for misleading you in the beginning. Chrome gives the same error with local files, and it uses webkit under the hood. As most of people are more familiar with chrome than qt webkit, I raised a bit different question, but I believe that the solution must be the same.
from amcharts3.
Alright, there's definitely a way to hack into html, pull an image out of canvas and pass it to the wrapping c++ code and save it afterwards. But of course, it would be easier for me to just use a working and tested solution. Thanks anyway.
from amcharts3.
Related Issues (20)
- Fill area above line
- unstable synchronization of multiple panels in stockchart v3 HOT 1
- Not correct splitting long label text in AxisCategory.
- Labels Y property
- How get value axis when clicked item?
- Unable to use Zoom event with Bootstrap Carousel
- 如何全局定义AMMAP执行SVG中的URL值 HOT 1
- Category Axis labels too long HOT 1
- "Smoothed Line" Chart messing up curves HOT 3
- Different color for the x axis label HOT 1
- Inconsistent column ordering in the exported CSV file when `valueField` is numeric
- In some cases property allLabels is undefined
- "Failed to execute 'toDataURL' on 'HTMLCanvasElement'" HOT 1
- How to draw Pie-chart in typescript
- How can I set a different field for tooltips in a PieChart? HOT 1
- One column is dropped when XLSX exports.
- addLabel is not working when postProcess is executed HOT 1
- url and color not working in my map area when i set them in data provider
- amchart persianDate
- e.AmSerialChart is not a constructor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amcharts3.