cvh

Members
  • Content count

    11
  • Joined

  • Last visited

About cvh

  • Rank
    Junior Member
  1. That worked perfectly, thank you! For anyone else running into the issue - I had to use Firefox rather than Chrome to get to the Adobe Flash Settings Manager. Right-click the bar on the chart and you should see a Global Settings menu - click that and you'll be sent to an Adobe website which embeds the Settings Manager for your machine. I added my charts folder (containing all the FusionCharts .swf files) into the location which instructs Flash to 'always trust files in these locations'. I am running Ubuntu 12.04, Firefox 14.0.1 and Adobe Flash 11.2.202.236
  2. Hello all. I'm trying to reach an external URL by clicking on a bar in a chart but nothing happens. I've read the LinkFormat documentation which indicates all we need is something along the lines of link="http://www.fusioncharts.com" , but cannot get it to work. Here is my code - any ideas, please? Thank you. <html><head><meta charset="utf-8"><title></title><script type="text/javascript" src="../charts/FusionCharts.js"></script></head><body><div id="chartContainer" style="width:100%; height:100%;">Chart should load here!</div><script type="text/javascript">var myChart = new FusionCharts("../charts/Column2D.swf", "myChartId", "100%", "100%", "0", "1"); myChart.setJSONData([{ "chart": { "caption": "Subscriber numbers", "xaxisname": "Channel", "yaxisname": "Subscribers" }, "data": [ { "label": "BBC", "value": "37800", "link": "http://news.bbc.co.uk" }, { "label": "CBS", "value": "21900", "link": "http://www.cbsnews.com" }, { "label": "SKY", "value": "32900", "link": "http://news.sky.com" }, { "label": "FOX", "value": "39800", "link": "http://www.foxnews.com" } ] }]);myChart.render("chartContainer");</script></body></html>
  3. For anyone else stumbling into this issue, I fixed it by this horrible hack (which just feels wrong!): 1. generate your JSON using GSON 2. strip the offending brackets - I used StringUtils from the lang library of the Apache Commons project - see here. 3. The Java code I used was as follows: String generatedJson = StringUtils.replace(generatedJson, "}},{", "},"); NB - line 3 above assumes you are generating compact JSON, i.e. not using the 'pretty printing' constructor of GSON. If you use pretty printing you will need to handle the line breaks between the curly braces.
  4. Thank you for your reply. Does this mean that FusionCharts doesn't adhere to the JSON standard? Or are you saying that GSON doesn't output valid JSON? If the latter then that's surprising, as I have run the JSON generated by GSON through a number of validators and it passes every time.
  5. Hello, I'm using Google GSON to build my JSON content, which I then use in a Scatter chart. The GSON produces valid JSON (which I have verified by running through the validator at jsonlint.com), but the Scatter chart fails to display correctly - the caption, palette, number prefix, axis names etc. don't show. By tinkering with the JSON I find it all works as intended (i.e. all chart elements display correctly) if I remove a few brackets, which are causing the problem - please see the .png attachment to this thread to see what I mean by unnecessary brackets. My question is - how do I get the JSON into a form recognised by FusionCharts, as having valid JSON seems somehow to be insufficient? (I have also attached the HTML generated so the FusionChart moderators can try and reproduce the problem and the fix). Thank you. 0010010011_2012-02-23_15:37:10.html
  6. You're welcome - please delete the superfluous word 'showing' in my text - it should read as follows: "Note that to show divisional lines without explicitly setting them, the axes max and min values must either be integers or have '.00' as the decimal."
  7. May I suggest the following addition to the documentation to be found at link here Additional text : "Note that to show divisional lines showing without explicitly setting them, the axes max and min values must either be integers or have '.00' as the decimal."
  8. Setjsonurl() In Evaluation Edition

    I don't think the DIV height is the issue here - in the code listings I pasted above you can see that this is explicitly set to 300px. Can you please try my examples and reproduce the same results I get? (By the way, I think there's a typo in your example - the argument to chart.render() should be chartContainer, not chartdiv?) Thank you.
  9. Setjsonurl() In Evaluation Edition

    Thank you for your reply, Angshu. I'm running the files from the local file system. I'm developing on Eclipse on Ubuntu, not using IIS.
  10. Hello all. I'm new to FusionCharts, and I'm using the evaluation version. Using the setJSONUrl() method for the .json file below results in 'no data found'. Using the same JSON in setJSONData() works fine. I read in another post that JSON isn't supported in the 'free edition' - is that the case and does this restriction apply to the evaluation version if so, why should it work when calling setJSONData()? The files 'weekly-sales.html' and 'weekly-sales.json' are in the same folder. weekly-sales.json: { "chart": { "caption" : "Weekly Sales Summary" , "xAxisName" : "Week", "yAxisName" : "Sales", "numberPrefix" : "{:content:}quot; }, "data" : [ { "label" : "Week 1", "value" : "14400" }, { "label" : "Week 2", "value" : "19600" }, { "label" : "Week 3", "value" : "24000" }, { "label" : "Week 4", "value" : "15700" } ] } weekly-sales.html (note the call to setJSONUrl(), this generates the 'no data found' error) <html> <head> <title>My First chart using FusionCharts</title> <script type="text/javascript" src="FusionCharts/FusionCharts.js"> </script> </head> <body> <div id="chartContainer" style="width:800px; height:300px;">FusionCharts will load here!</div> <script type="text/javascript"><!-- var myChart = new FusionCharts( "FusionCharts/Pie3D.swf", "myChartId", "80%", "100%", "0", "1" ); myChart.setJSONUrl("weekly-sales.json"); myChart.render("chartContainer"); // --> </script> </body> </html> This version, which calls setJSONData(), works fine: <html> <head> <title>My First chart using FusionCharts</title> <script type="text/javascript" src="FusionCharts/FusionCharts.js"> </script> </head> <body> <div id="chartContainer" style="width:800px; height:300px;">FusionCharts will load here!</div> <script type="text/javascript"><!-- var myChart = new FusionCharts( "FusionCharts/Pie3D.swf", "myChartId", "80%", "100%", "0", "1" ); myChart.setJSONData( { "chart": { "caption" : "Weekly Sales Summary" , "xAxisName" : "Week", "yAxisName" : "Sales", "numberPrefix" : "{:content:}quot; }, "data" : [ { "label" : "Week 1", "value" : "14400" }, { "label" : "Week 2", "value" : "19600" }, { "label" : "Week 3", "value" : "24000" }, { "label" : "Week 4", "value" : "15700" } ] } ); myChart.render("chartContainer"); // --> </script> </body> </html> Thank you.