• Content count

  • Joined

  • Last visited

Everything posted by rubytuby

  1. Hello, I have a chart that has multiple sets of bar charts. Each set represents a grouping that has it's own unique name. Within each set, each bar requires it's own unique label. I can't find a good way to label each bar with their own label. (See attached screenshot). I have tried separating the bar's labels with a pipe symbol "|", but when there are many bars, the label wraps to a new line and it looks very bad and confusing! The label for each set of bars is easy because I added a "{br}" to force a new line. I understand that the labels for each bar should be rotated, but it's not possible to rotate only the bar labels, and leave the group label horizontal... it would be nice to specify which lines of the label need to be rotated!!! Anyways, does anyone have any ideas how I can label the bars to make them readable? Here is my current label code. Keep in mind there can be even more bars within each set (upto 12). <categories> <category label='Comp|Neuro|ADRD|TBI|SCI|ALS|MD|CP{br}Mental Health' /> <category label='Comp|Neuro|ADRD|TBI|SCI|ALS|MD|CP{br}Home Care' /> <category label='Comp|Neuro|ADRD|TBI|SCI|ALS|MD|CP{br}Nursing Home' /> <category label='Comp|Neuro|ADRD|TBI|SCI|ALS|MD|CP{br}Complex Continuing Care' /> </categories> Thanks, Dan
  2. Trouble With Setxmldata

    Hello, I'm having some trouble getting a chart to update its XML by using the setXMLData function in Javascript. Any help would be greatly appreciated!! I'm initializing a chart on load with this: (The chart loads just fine) <script type="text/javascript"> theChart = new FusionCharts( "FusionCharts_evaluation/charts/MSColumn2D.swf", "ChartId", "700", "600", "0", "1", "#DCD8EB" ); theChart.configure("ChartNoDataText", "No data yet. Please select options from above to display a chart"); theChart.setXMLUrl("data.xml"); theChart.render("chartContainer"); </script> There are some selectors at the top of the page that submits (via jQuery ajax) to a service that will send back new XML for a new chart. Here is the code that grabs the new XML and tries to update the chart: <script type="text/javascript"> $("#chart_form").submit(function(event) { event.preventDefault(); $form_data = $(this).serialize(); $.ajax({ type: 'POST' ,url: '<cfoutput>#REQUEST.site_prefix#</cfoutput>/charting.cfc' ,data: {method: 'initChart' ,data: $form_data} ,dataType: 'xml' ,success: function(data) { theChart.setXMLData(data); } }); }); </script> I've tested the XML that the service returns and it's fine. This code will actually crash FireFox (I think it's because of FireBug). It will do nothing in IE or in Chrome. Any advice? Is the XML nested somewhere within the 'data' object or something? Thanks, Dan
  3. Trouble With Setxmldata

    Thanks for helping me with this. I haven't tried it out because I ditched using AJAX and now use a typical form submit to grab the xml (due to time constraints). Hopefully this thread will be helpful to the next person who had the problem I was having.
  4. Trouble With Setxmldata

    Thanks for the reply! I've added: var chartReference = new FusionCharts("myChartId"); chartReference.setXMLData(data); chartReference.render("chartContainer"); which causes the chart to give the error: "Chart type not supported". Any other suggestions? The XML that's being returned is valid and will plot properly if I put it in a static XML file. You can see this if you test it at: Thanks, Dan
  5. Trouble With Setxmldata

    Sorry for all the bumps... I really need help with this. Here's a URL to test it out. Select something from the two drop-downs and the check boxes, then click Plot:
  6. Trouble With Setxmldata

    Thought it might be useful to post XML that the web service is returning. I've put this XML in a static XML file and FusionCharts displays it properly. (I left formatting as-is) <?xml version="1.0" encoding="UTF-8"?> <chart caption="Stuff" showValues="1" xAxisName="Conditions" yAxisName="Percent"><categories><category label="Comparison Group"/><category label="Any other PHAC neuro/Stroke"/><category label="Parkinsons"/><category label="Huntingtons"/><category label="MS"/><category label="Epilepsy"/><category label="ADRD"/><category label="TBI"/><category label="SCI"/><category label="ALS"/><category label="MD"/><category label="CP"/></categories><dataset seriesName="0"><set value="61.4"/><set value="20.0"/><set value="25.6"/><set value="10.9"/><set value="52.6"/><set value="27.8"/><set value="1.9"/><set value="22.8"/><set value="81.6"/><set value="56.8"/><set value="71.3"/><set value="33.6"/></dataset><dataset seriesName="1--2"><set value="34.9"/><set value="50.4"/><set value="53.0"/><set value="59.2"/><set value="40.4"/><set value="47.5"/><set value="50.8"/><set value="55.3"/><set value="18.4"/><set value="35.4"/><set value="25.3"/><set value="32.7"/></dataset><dataset seriesName="3--4"><set value="2.6"/><set value="18.3"/><set value="12.7"/><set value="19.4"/><set value="4.1"/><set value="11.3"/><set value="28.9"/><set value="13.8"/><set value="0.0"/><set value="5.9"/><set value="2.2"/><set value="11.2"/></dataset><dataset seriesName="5--6"><set value="1.1"/><set value="11.3"/><set value="8.7"/><set value="10.6"/><set value="2.8"/><set value="13.4"/><set value="18.4"/><set value="8.1"/><set value="0.0"/><set value="1.9"/><set value="1.3"/><set value="22.6"/></dataset></chart> Just to be clear, I'm getting errors when the jQuery code get to: theChart.setXMLData(data);
  7. Trouble With Setxmldata

    More debugging info: Since it was crashing in Firefox, I didn't have any error info. Tried in Chrome with Developer Tools running and I get the following errors when I run the code from the original post: Error 1: Uncaught RangeError: Maximum call stack size exceeded __flash__toXML __flash__objectToXML __flash__toXML __flash__objectToXML __flash__toXML __flash__objectToXML .. .. Error 2: Uncaught Error: Error calling method on NPObject. (FusionCharts.js:101) a.renderer.register.update a.renderer.update a.extend.setChartData a.addDataHandler.e.(anonymous function) $.ajax.success f.Callbacks.o f.Callbacks.p.fireWith w Hope this is helpful. Also, it's worth mentioning that I've also tried using the FusionCharts jQuery plugin to achieve the same thing and got the same errors. Dan