• Content count

  • Joined

  • Last visited

Posts posted by Tumbleweed

  1. Ok, with a little help I was able to get to this point:


    <title>My First chart using 
    FusionCharts XT - using XML data embedded in the 
    <script type="text/javascript" 
      $.ajax({url : 
        dataType : 
        success : 
    function(parsed_json) {
          var myChart 
    = new FusionCharts("Charts/Column3D.swf", "myChartId", "400", "300", 
    myChart.setXMLData("<chart caption='Temperature for my area' 
    xAxisName='Temperature' yAxisName='In Celsius' >"+
    "<set label='" + parsed_json['location']['city'] + "' value='" + 
    parsed_json['current_observation']['temp_f'] + "'/>" + 
    <div id="chartContainer">FusionCharts 
    XT will load here</div>

     I am unable to get this same code to work with FusionWidgets, a AngularGauge.  Is there something I am missing?  I would appreciate any help.


  2. Thanks but I am not code smart enough to do that.  Here is what I am trying to do.  I would like to pull the "temp_f" value once not Real Time using the below code and use the pulled variable as the value in a chart, any standard chart.  Is this possible?  I can pull the temp_f data but I need to know what to do to format it so it can be then used as a variable value in a chart.  I would really appreciate any help anyone could offer.



    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Weather Temperature</title>
    <?php $json_string = file_get_contents("http://api.wunderground.com/api/fee47ffeca88d616/geolookup/conditions/q/VA/Yorktown.json");
    $parsed_json = json_decode($json_string);
    $location = $parsed_json->{'location'}->{'city'};
    $temp_f = $parsed_json->{'current_observation'}->{'temp_f'};
    echo "Current temperature in ${location} is: ${temp_f}\n"; ?>

  3. My desire was not to have real time but to grab the current temperature from the source at the time of page load.  I really do not want to display updated/real time just the current condition.  Is that possible?


  4. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> 
    <script> jQuery(document).ready(function($) { $.ajax({ url : "http://api.wunderground.com/api/fee47ffeca88d616/geolookup/conditions/q/VA/Yorktown.json", dataType : "jsonp", success : function(parsed_json) { var temp_f = parsed_json['current_observation']['temp_f']; } }); }); </script>

    Thank you very much for the response.  Is there a way I can use the above to gather the variable and insert it into the  chart data instead of the entire xml?


    Thanks again,


  5. {
      "response": {
      "features": {
      "conditions": 1
      ,	"current_observation": {
    		"image": {
    		"title":"Weather Underground",
    		"display_location": {
    		"full":"Yorktown, VA",
    		"observation_location": {
    		"full":"York County, Virginia, Yorktown, Virginia",
    		"city":"York County, Virginia, Yorktown",
    		"elevation":"8 ft"
    		"estimated": {
    		"observation_time":"Last Updated on March 23, 5:51 PM EDT",
    		"observation_time_rfc822":"Sun, 23 Mar 2014 17:51:27 -0400",
    		"local_time_rfc822":"Sun, 23 Mar 2014 17:52:07 -0400",
    		"weather":"Light Rain",
    		"temperature_string":"37.2 F (2.9 C)",
    		"wind_string":"From the NNE at 3.0 MPH Gusting to 7.0 MPH",
    		"dewpoint_string":"35 F (2 C)",
    		"windchill_string":"37 F (3 C)",
    		"feelslike_string":"37 F (3 C)",
    		"UV":"0","precip_1hr_string":"-999.00 in ( 0 mm)",
    		"precip_1hr_metric":" 0",
    		"precip_today_string":"0.11 in (3 mm)",
    		"soil_temp_f": "0.0",
    		"soil_moisture": "0.0",
    		"leaf_wetness": "0.0",

    I've been reading and trying for about 5 days now, to learn about populating charts with data pulled from a source and I give up.  I consider myself to be a less than fair at coding but I try to take things I find on this forum and other places and piece them together to make something work.  So far I have failed miserably.


    I am trying to produce a single chart (Single Series Column 2D or anything) that displays temperature for my area.  I would like to pull the temperature from a local WUNDERGROUND spot for display on a Dashboard I am creating.  The data for the other charts on my Dashboard are static .xml files and they all work well.  


    Where I need help is writing the code for a SSC2D chart using the data I pull using the WUNDERGROUND json file.  Above is the json file.  The data I need for the VALUE is under "current_observation" "temp_f".


    I would truly appreciate any help you could offer.  I am a registered owner of FusionCharts XT and therefore would like to use a chart from that package.


    Once again, Thanks!