DannyR
Members-
Content count
83 -
Joined
-
Last visited
Everything posted by DannyR
-
First, thanks for FusionCharts. I'm glad I was able to convince my company to make the investment. I'm not sure if you would consider this a bug (I would from a developer's usability standpoint), but this may help some other people who are struggling with the "style" object in the Json data format. Using FusionCharts("id").getJSONData() we can see that the typical style object is structured like this: "styles":[ { "definition":[ { "style":[ { "type":"font", "color":"666666", "name":"CaptionFont", "size":"15" }, { "type":"font", "name":"SubCaptionFont", "bold":"0" } ] } ], "application":[ { "apply":[ { "toobject":"caption", "styles":"CaptionFont" }, { "toobject":"SubCaption", "styles":"SubCaptionFont" } ] } ] } ] However, if you feed this object to the chart using setJSONData() what will happen is the chart will interpret this object as follows [substituting (..) for brevity]: "styles":[ { "definition":[ { "style":[ { "style":[ (..) ] } ] } ], "application":[ { "apply":[ { "apply":[ (..) } ] } ] } ] Note the extra "style" and "apply"! Having observed this, I changed my input object to the following structure: "styles":[ { "definition":[ (..) ], "application":[ (..) ] } ] ... thus eliminating the "style" and "apply" properties altogether and moving the "definition" and "application" arrays up a level. This seems to work just fine. If this is the intended behavior, maybe this could be documented somewhere?
-
Problem Displaying A Column2D Graph On Ipad
DannyR replied to Taylor Hayward's topic in General usage
Please post your code. -
My pleasure. Keep up the great work guys!
-
Numdivlines Not Working In Html5, Have To Use _Overridejschartconfiguration
DannyR posted a topic in Bug Reports
This is on Column3D, but may exist in others as well. With numDivLines set to 3 when Y-Axis goes from 0-100, there should be a tick every 25 (max-min / numdivlines + 1). Works in Flash version, but for HTML5 we have to use _overrideJSChartConfiguration to get the desired result: <script language="JavaScript"> var jsonData = { chart: { yaxisminvalue: "0", yaxismaxvalue: "100", numDivLines: "3" }, data:[{ value: "30" }] }; FusionCharts.setCurrentRenderer("javascript"); var chart = new FusionCharts("../../js/FusionCharts/Column3D.swf", "myChart-chartId", 300, 200); chart.setJSONData(jsonData); if (!!chart._overrideJSChartConfiguration) { chart._overrideJSChartConfiguration({ yAxis: [{ tickInterval: 25 }] }); } chart.render("myChart"); </script> I've attached a screenshot as well. -
tickInterval is what you want to use for the override. See my post here: http://forum.fusionc...tconfiguration/ I assume you mean to use 4 div lines (20% gap), not 5 div lines (16% gap). Also, the code you posted does not match the screenshot that you attached.
-
Chart Not Rendering In Html5 Mode While It Works In Flash Mode.
DannyR replied to srikanth964's topic in XML Issue
Replace all instances of '&' with '&'. Should do the trick. =] -
Please post your code!
-
Please post code snippets.
-
You would need to use the entity reference codes (take the spaces out): & # 8 5 9 2 ; = ← & # 8 5 9 3 ; = ↑ & # 8 5 9 4 ; = → & # 8 5 9 5 ; = ↓ As for coloration in labels, I don't think that is possible.
-
Actually, there is a workaround I've discovered. Place this code in before you call render(), it will show only every 4th label as you've asked: if (!!chart_dt_inout_chart._overrideJSChartConfiguration) { chart_dt_inout_chart._overrideJSChartConfiguration({ xAxis: { labels: { formatter: function() { if (this.index % 4 == 0) { return this.value; } else { return ""; } } } } }); }
-
Detect Flash -- Replacement For Infosoftglobal.fusionchartsutil?
DannyR replied to gludington's topic in Javascript Problems
I understand your frustration as I've discussed this before in the past. See this thread here. However, I wouldn't consider this a showstopper, as you say. It's an unfortunate bug (/feature request). There are MANY sniffers available to detect Flash. So we as developers have options. (I mention in the above-mentioned post that I use Dojo's built-in detection since we're a Dojo shop). On the other hand, I would agree that proper Flash detection in an essentially Flash-based tool should be of the utmost priority. -
Flash And Javascript Renders Are Different After Setting Props
DannyR replied to dudiq's topic in Javascript Problems
You need to set showBorder="1" in your XML string. In JS fallback, the border shows by default, in Flash it is hidden by default. -
Using Highcharts Api - Add Series, Add Point, Detect Chart/point Click Event
DannyR replied to donp's topic in Javascript Problems
Hi Don - The HighCharts API is exposed through a method called _overrideJSChartConfiguration(). ANY property of the chart object (including methods) should be overrideable, and it will use the event model as defined by jQuery. Take a look at the following example: <div id="myChart"></div> <script language="JavaScript"> var jsonData = { "data":[ { label: "Failed", value: "1", issliced: "1" }, { label: "Passed", value: "4" } ] }; FusionCharts.setCurrentRenderer("javascript"); var chart = new FusionCharts("../../js/FusionCharts/Pie2D.swf", "myChart-chartId", 400, 300); if (!!chart._overrideJSChartConfiguration) { chart._overrideJSChartConfiguration({ chart: { events: { click: function(event) { alert("x, y: (" + event.layerX + ", " + event.layerY + ")"); } } } }); } chart.setJSONData(jsonData); chart.render("myChart"); </script> -
A Question About Javascript Renderer Use
DannyR replied to phido's topic in Installation and Upgrades
Np! =] -
Always glad to help. Check out my other post here if you want to fix the divlines issue on the Y Axis: http://forum.fusioncharts.com/topic/7747-numdivlines-not-working-in-html5-have-to-use-overridejschartconfiguration/
-
No problem. Let me know how you make out.
-
Not sure what I'm meant to be looking at. I see a map. I'd suggest diffing our xml files to see where the problem might be. If that doesn't work, diff the html. Since we now know my example is what you want, I think its on you now to find out how your code is different than mine. I'll leave it up there for as long as you need it. Fair enough?
-
Ok, that's exactly what I'm seeing. Is that not what you wanted?
-
Sorry, thought you had a second browser set up with no flash. I just uploaded a second file, same things, but with the renderer set to "javascript". Please take a ss of this one: http://www.dannyscot.com/danny/fusion/msline_test2_noflash.html
-
Ok, I uploaded my testing harness. Can you take screenshots of both versions of what you see here: http://www.dannyscot.com/danny/fusion/msline_test2.html
-
You need label and showName (not showLabel). Don't ask me why...
-
Also, note that the !! is absolutely necessary. It checks to see if that method exists on the chart (which it only would when it falls back to JS). If you changed it to !, you just negated its meaning (and probably threw a JS error which is why the chart disappeared).
-
Make sure you're labeling your categories like so: <category label="Midnight" showName="1"/><!-- show cat --> <category label="0:5"/><!-- hide cat --> And here's the JS. It's working fine for me. (I think your problem is in the XML anyway): if (!!dailyChart._overrideJSChartConfiguration) { dailyChart._overrideJSChartConfiguration({ xAxis: { labels: { formatter: function() { if (this.index % 36 == 0) { return this.value; } else { return ""; } } } } }); } dailyChart.render("dailyChart");
-
Also, use: <category label="Midnight"/> in place of: <category name="Midnight"/>
-
Here's the other part of the problem that we've seen before... too many labels on the X Axis. Nik, try adding this code before you call render(): if (!!dailyChart._overrideJSChartConfiguration) { dailyChart._overrideJSChartConfiguration({ xAxis: { labels: { formatter: function() { if (this.index % 36 == 0) { return this.value; } else { return ""; } } } } }); }