Search the Community

Showing results for tags 'JSON'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Company Forums
    • Company News
  • Product Forums
    • FusionCharts XT
    • FusionWidgets XT
    • PowerCharts XT
    • FusionMaps XT
    • Collabion Charts for SharePoint
    • jQuery Plugin for FusionCharts
    • AngularJS plugin
    • ReactJS plugin
  • General Forums
    • FusionCharts Jobs and Consultation
    • FusionLounge

Found 13 results

  1. 2D Column stack - limited to 7

    Hello there, I'm using MySQL/PHP with PHPWrapper to make use of the FusionCharts. I've been able to get the data to get it rendered as 2D column stacks but are stuck at 7 despite having any limits attached to it. I'm using it to display the count of records for each month starting Apr, till Nov but the first stack starts from May when I Group the data by month in ASC. The interesting bit is that when i change this to DESC, i see the data from OCt- Apr (7 records) and the Nov data goes missing. I have not kept any limits defined that may be stopping this but yet i can get this to work. My data set type in MySQL are; acqid - INT acq_month - DATE fusioncharts.php & its associated JS are properly called upon in the file. Can anyone help? Thanks!!! Following is the code that I'm using; <?php // Form the SQL query that returns the top 10 most populous countries $strQuery = "SELECT count(acqid), acq_month FROM newacq GROUP BY MONTH(acq_month) ASC limit 13"; // Execute the query, or else return the error message. $result = $conn->query($strQuery) or exit("Error code ({$conn->errno}): {$conn->error}"); $arr=mysqli_fetch_array($result); //while($arr=mysqli_fetch_array($result)) { // print_r($arr); //} // If the query returns a valid response, prepare the JSON string if ($result) { // The `$arrData` array holds the chart attributes and data $arrData = array( "chart" => array( "caption" => "New Acq", "showValues" => "1", "theme" => "zune" ) ); $arrData["data"] = array(); // Push the data into the array while($row = mysqli_fetch_array($result)) { array_push($arrData["data"], array( "label" => date("M-Y", strtotime($row["acq_month"])), "value" => $row["count(acqid)"], ) ); } /*JSON Encode the data to retrieve the string containing the JSON representation of the data in the array. */ $jsonEncodedData = json_encode($arrData); /*Create an object for the column chart using the FusionCharts PHP class constructor. Syntax for the constructor is ` FusionCharts("type of chart", "unique chart id", width of the chart, height of the chart, "div id to render the chart", "data format", "data source")`. Because we are using JSON data to render the chart, the data format will be `json`. The variable `$jsonEncodeData` holds all the JSON data for the chart, and will be passed as the value for the data source parameter of the constructor.*/ $columnChart = new FusionCharts("column2D", "myFirstChart" , 820, 300, "chart-1", "json", $jsonEncodedData); // Render the chart $columnChart->render(); // Close the database connection $conn->close(); } ?> <div id="chart-1"><!-- Fusion Charts will render here--></div> With ASC this is how it appears; And with DESC this is how it appears; EDIT - When i tried fetching the details carried out in the ARRAY using [print_r], I got the following message; Array ( [0] => 208 [count(acqid)] => 208 [1] => 2017-04-01 [acq_month] => 2017-04-01 ) Array ( [0] => 241 [count(acqid)] => 241 [1] => 2017-05-01 [acq_month] => 2017-05-01 ) Array ( [0] => 243 [count(acqid)] => 243 [1] => 2017-06-01 [acq_month] => 2017-06-01 ) Array ( [0] => 269 [count(acqid)] => 269 [1] => 2017-07-01 [acq_month] => 2017-07-01 ) Array ( [0] => 373 [count(acqid)] => 373 [1] => 2017-08-01 [acq_month] => 2017-08-01 ) Array ( [0] => 370 [count(acqid)] => 370 [1] => 2017-09-01 [acq_month] => 2017-09-01 ) Array ( [0] => 283 [count(acqid)] => 283 [1] => 2017-10-01 [acq_month] => 2017-10-01 ) Array ( [0] => 312 [count(acqid)] => 312 [1] => 2017-11-01 [acq_month] => 2017-11-01 ) It does show the information carried out for April & Nov including. If it helps!
  2. using itext render at server side to to generate pdf from HTML (passed in ajax call) , need is to fit fusion chart also in pdf...data is in json format..please suggest
  3. I am trying to create an msline chart using PHP and JSON to display data from my SQL database using the Fusion Charts Factory Sample database as my guide. In both cases (with Factory Sample data and my own data) the first value in each data series are duplicated as the first and second data point, and the last value does not appear on the chart. My SQL query returns the following datasets $strQueryCategories Game R9,2015 R9,2015 R20,2015 R20,2015 EF,2015 R1,2016 R1,2016 $strQuery​Data Team Game Total Claremont R9,2015 60 Claremont R20,2015 60 Claremont EF,2015 61 Claremont R1,2016 110 East Perth R9,2015 21 East Perth R20,2015 70 East Perth EF,2015 93 East Perth R1,2016 34 // Form the SQL query $strQueryCategories = "SELECT CONCAT(RoundNo, ',',Season) AS Game FROM MatchDetails WHERE (Team = 'East Perth' OR Opponent = 'East Perth') AND (Team = 'Claremont' OR Opponent = 'Claremont') AND Season > 2014 ORDER BY GameID ASC"; $resultCategories = $dbhandle->query($strQueryCategories)or exit("Error code ({$dbhandle->errno}): {$dbhandle->error}"); $strQueryData = "SELECT Team, CONCAT(RoundNo, ',',Season) AS Game, Total FROM MatchDetails WHERE (Team = 'East Perth' OR Opponent = 'East Perth') AND (Team = 'Claremont' OR Opponent = 'Claremont') AND Season >2014 ORDER BY Team, GameId ASC"; $resultData = $dbhandle->query($strQueryData)or exit("Error code ({$dbhandle->errno}): {$dbhandle->error}"); if ($resultData) { $arrData = array( "chart" => array( "caption" => "Head to Head Since Start 2015", "subcaption" => "Scores For & Against", "theme" => "fint" ) ); $arrData["categories"] = array(array("category" => array())); if ($resultCategories) { $controlBreakValue = ""; while ($row = mysqli_fetch_array($resultCategories)) { if ($controlBreakValue != $row["Game"]) { $controlBreakValue = $row["Game"]; array_push( $arrData["categories"][0]["category"], array("label" => $controlBreakValue)); $controlBreakValue == ""; } } } $arrData["dataset"] = array(); $i = 0; if ($resultData) { $controlBreakValue = ""; while ($row = mysqli_fetch_array($resultData)) { if ($controlBreakValue != $row["Team"]) { $controlBreakValue = $row["Team"]; array_push($arrData["dataset"], array("seriesname" => $controlBreakValue, "data" => array(array("value" => $row["Total"])))); $controlBreakValue == ""; $i++; } array_push($arrData["dataset"][$i-1]["data"], array("value" => $row["Total"])); } } } $jsonEncodedData = json_encode($arrData); $dbhandle->close(); echo $jsonEncodedData; ?> <html> <body> <?php $columnChart = new FusionCharts("msline", "myFirstChart" , 850, 300, "chart-1", "json", $jsonEncodedData); $columnChart->render(); ?> <div id="chart-1"><!-- Fusion Charts will render here--></div> </body> </html> ​ Chart output is attached. You can see the first value is duplicated.
  4. Halo, Can Somebody help me for make example multiple series using JSON in PHP Framework Codeigniter with MySQL, Not using XML but JSON. Please can someone to help me.
  5. var arrcolor = ["00ff00", "800080", "ffa500", "ff0000"]; var count = data.length; for(var i=0;i<count;i++) { var obj = { label : data.Description, value : data.Value, link : "JavaScript: AnalysisByDrillDownLaceScoreGraph(" + data.Description + ")", color : arrcolor } data_array.push(obj); } var objJSON = { chart : { "bgcolor": "ffffff", "xAxisName": "Range", "yAxisName": "Count", "formatnumber": "1", "formatnumberscale": "6", "sformatnumber": "1", "showplotborder": "0", "canvasborderalpha": "0", "theme": "zune" }, data : (data_array) }; var newdata = JSON.stringify(objJSON); var AnalysisChart = new FusionCharts({ type: 'mscolumn2d', renderAt: 'divChartAnalysis', width: '110%', height: '250', dataFormat: 'json', dataSource: newdata }); AnalysisChart.render(); This is how i prepared the chart . the newdata is as follows newdata = {"chart":{"bgcolor":"ffffff","xAxisName":"Range","yAxisName":"count","formatnumber":"1","formatnumberscale":"6", sformatnumber":"1", "showplotborder":"0","canvasborderalpha":"0","theme":"zune"},"data":[{"label":"0-4","value":426,"color":"00ff00"},{"label":"5-9","value":2655,"color":"800080"},{"label":"10-14","value":1808,"color":"ffa500"},{"label":"15-19","value":45,"color":"ff0000"}]} Yet the fusionChart is displaying no data to display.. Pls someone help me with this. the state of dataready is shown as false.
  6. I'm using a 2D Stacked area chart with a json data source similar to the example below (but with a lot more dates). I'd like to add a drop-down menu on the page that filters the data by date range. Any suggestions on the best way to do this? Thanks, { "graph": { "caption": "My Chart" }, "categories": [ { "category": [ {"name": "01/10/2007","showname": "1"}, ..... {"name": "10/15/2014","showname": "0"} ] } ], "dataset": [ { "seriesname": "First Series", "data": [ {"value": "771569"}, ... {"value": "358887"} ] }, { "seriesname": "Second Series", "data": [ {"value": "7347"}, ... {"value": "12596"} ] }, { "seriesname": "Third Series", "data": [ {"value": "40857"}, ... {"value": "0"} ] } ] }
  7. Please help!

    { "response": { "version":"0.1", "termsofService":"http://www.wunderground.com/weather/api/d/terms.html", "features": { "conditions": 1 } } , "current_observation": { "image": { "url":"http://icons-ak.wxug.com/graphics/wu2/logo_130x80.png", "title":"Weather Underground", "link":"http://www.wunderground.com" }, "display_location": { "full":"Yorktown, VA", "city":"Yorktown", "state":"VA", "state_name":"Virginia", "country":"US", "country_iso3166":"US", "zip":"23690", "magic":"1", "wmo":"99999", "latitude":"37.22531891", "longitude":"-76.52363586", "elevation":"28.00000000" }, "observation_location": { "full":"York County, Virginia, Yorktown, Virginia", "city":"York County, Virginia, Yorktown", "state":"Virginia", "country":"US", "country_iso3166":"US", "latitude":"37.182751", "longitude":"-76.470512", "elevation":"8 ft" }, "estimated": { }, "station_id":"KVAYORKT2", "observation_time":"Last Updated on March 23, 5:51 PM EDT", "observation_time_rfc822":"Sun, 23 Mar 2014 17:51:27 -0400", "observation_epoch":"1395611487", "local_time_rfc822":"Sun, 23 Mar 2014 17:52:07 -0400", "local_epoch":"1395611527", "local_tz_short":"EDT", "local_tz_long":"America/New_York", "local_tz_offset":"-0400", "weather":"Light Rain", "temperature_string":"37.2 F (2.9 C)", "temp_f":37.2, "temp_c":2.9, "relative_humidity":"93%", "wind_string":"From the NNE at 3.0 MPH Gusting to 7.0 MPH", "wind_dir":"NNE", "wind_degrees":22, "wind_mph":3.0, "wind_gust_mph":"7.0", "wind_kph":4.8, "wind_gust_kph":"11.3", "pressure_mb":"1017", "pressure_in":"30.03", "pressure_trend":"0", "dewpoint_string":"35 F (2 C)", "dewpoint_f":35, "dewpoint_c":2, "heat_index_string":"NA", "heat_index_f":"NA", "heat_index_c":"NA", "windchill_string":"37 F (3 C)", "windchill_f":"37", "windchill_c":"3", "feelslike_string":"37 F (3 C)", "feelslike_f":"37", "feelslike_c":"3", "visibility_mi":"6.0", "visibility_km":"9.7", "solarradiation":"56", "UV":"0","precip_1hr_string":"-999.00 in ( 0 mm)", "precip_1hr_in":"-999.00", "precip_1hr_metric":" 0", "precip_today_string":"0.11 in (3 mm)", "precip_today_in":"0.11", "precip_today_metric":"3", "soil_temp_f": "0.0", "soil_moisture": "0.0", "leaf_wetness": "0.0", "icon":"rain", "icon_url":"http://icons-ak.wxug.com/i/c/k/rain.gif", "forecast_url":"http://www.wunderground.com/US/VA/Yorktown.html", "history_url":"http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KVAYORKT2", "ob_url":"http://www.wunderground.com/cgi-bin/findweather/getForecast?query=37.182751,-76.470512" } } 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! Rudy
  8. Due to a system limitation, I can only produce in JSON "dataset":[{"label":"Desktop","seriesname":"A","value":"335000"}] instead of the below in the documentation. Anyway to configure it so that it will take the figures similar to my ideal case? Can someone suggest a workaround for me? This is for MariMekko chart and I'm new to FusionCharts. Thanks in advance. "categories":[{ "category":[{ "label":"Desktop" }, { "label":"Laptop" }, { "label":"Notebook" } ] } ], "dataset":[{ "seriesname":"A", "data":[{ "value":"335000" }, { "value":"225100" }, { "value":"164200" } ] }, { "seriesname":"B", "data":[{ "value":"245000" }, { "value":"198000" }, { "value":"120000" } ] }, { "seriesname":"C", "data":[{ "value":"298000" }, { "value":"109300" }, { "value":"153600" }
  9. Hello, I have a MSLine chart using validated JSON. This works fine using the flash but when I try to render it in javascript it errors. If I use myChart.setJSONUrl("ReceiptsMSLine.json"); I get invalid data error If i use myChart.setJSONData('MyJson'); I get the error: Line: 15 Error: Unable to get value of the property 'split': object is null or undefined Any help would be greatly appreciated. code is below: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Financial Chart</title> <script src="../../Charts/FusionCharts_EnterpriseEx/Charts/FusionCharts.js" type="text/javascript"></script> <script src="../../Charts/FusionCharts_EnterpriseEx/Charts/jquery.min.js" type="text/javascript"></script> <script src="../../Charts/FusionCharts_EnterpriseEx/Charts/highcharts.js" type="text/javascript"></script>   </head> <body> <div id="wrapper">   <div id="chartContainer">FusionCharts will load here</div> <script type="text/javascript"><!-- FusionCharts.setCurrentRenderer('javascript'); var myChart = new FusionCharts("../../Charts/FusionCharts_EnterpriseEx/Charts/MSLine.swf", "ChartId", "800", "500", "0", "0"); //myChart.setJSONUrl("ReceiptsMSLine.json"); myChart.setJSONData('{"chart":{ "caption":"Receipts - cumulative", "xaxisname":"Month", "yaxisname":"Receipts £", "showvalues":"0", "numberprefix": "%A3", "bgColor":"ffffff", "showBorder":"0","numVDivLines":"10","reverseLegend":"1"},"categories":[{"category":[{"label":"Apr"},{"label":"May"},{"label":"Jun"},{"label":"Jul"},{"label":"Aug"},{"label":"Sep"},{"label":"Oct"},{"label":"Nov"},{"label":"Dec"},{"label":"Jan"},{"label":"Feb"},{"label":"Mar"}]}],"dataset":[{"seriesname":"Monthly Plan","color": "af292e","data":[{"value":"9378010"},{"value":"71026533"},{"value":"90101266"},{"value":"97825351"},{"value":"103616222"},{"value":"117813441"},{"value":"128052071"},{"value":"136053732"},{"value":"149482740"},{"value":"156552766"},{"value":"162577528"},{"value":"313978555"}]},{"seriesname":"DEL Forecast","color":"00857e","dashed":"1","data":[{"value":""},{"value":""},{"value":""},{"value":""},{"value":""},{"value":""},{"value":""},{"value":""},{"value":"211006263"},{"value":"230506969"},{"value":"247861703"},{"value":"324894030"}]},{"seriesname":"Actual YTD","color":"00857e","data":[{"value":"8305075"},{"value":"69262137"},{"value":"84307885"},{"value":"99994631"},{"value":"119527041"},{"value":"142661942"},{"value":"160449790"},{"value":"180489689"},{"value":"211006263"},{"value":""},{"value":""},{"value":""}]}],"styles":[{"definition":[{"style":[{"name":"CanvasAnim","type":"animation","param":"_xScale","start":"0","duration":"1"}]}],"application":[{"apply":[{"toobject":"Canvas","styles":"CanvasAnim"}]}]}]}'); myChart.render("chartContainer" ); </script> </div> </body> </html>
  10. Hi, I render a column2D chart through JavaScript, which works fine. If I add the showValues property to the chart element, then it results in a "Invalid Data" message. If I leave it, then it will render as expected. The showValues property is mentioned in the functional attributes under http://docs.fusioncharts.com/charts/contents/ChartSS/Column2D.html#Anchor1. "chart": { "caption": "Category wise Sales for 1996", "xaxisname": "Month", "palette": "2", "animation": "1", "formatnumberscale": "0", "numberprefix": "$", "showvalues": "0", "numdivlines": "4", "legendposition": "BOTTOM", "showValues":"0" } (Complete JSON attached Column2D.txt) Could you please take a look at this and notify me when this will be fixed. P.s. I am not allowed to upload .json files, so I've renamed it to .txt.
  11. Hi, Im trying to create a FusionMaps (version 3.2.1) map with JSON data: ... var map = new FusionCharts('fusioncharts/Maps/FCMap_World.swf', 'MapId', '900', '300', '0', '0'); map.setTransparent(true); map.setJSONData('{"map":{},"data":[{"id":"NA","value":"25"}]}'); map.render('mapdiv'); ... After running the script the map is shown without data. But when im running the same script with current evaluation version of FusionMaps (version 3.3.1) the data is diplayed correctly. Is there a bug in version 3.2.1 or is there any mistake in my JSON data string? Thanks, msch4711
  12. Hi, I created a sample radar chart with JSON value updated dynamically from MYSQL DB. I am unable to get interactive Legend (which is clickable).
  13. Radarchart With Json Data

    Hi, We are working on RadarChart, dataset and cateogories are retrieved from JSON Data, We need to specify some datapoints to be highlighted. How this can be achived. Please help us immediately