DannyR

Members
  • Content count

    83
  • Joined

  • Last visited

Posts posted by DannyR


  1. 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 "";
    				}
    			}
    		}
    	}
    });
    }
    


  2. 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.


  3. 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>
    


  4. 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?


  5. 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");
    


  6. 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 "";
    				}
    			}
    		}
    	}
    });
    }