Search the Community

Showing results for tags 'MySQL'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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 15 results

  1. Hi, Hi, My name is Irfan from Indonesia. I'm studying graphs, in this case cylindrical charts. But I have a problem in retrieving data from the database which is implemented in javascript in the realtime feedData function. Please explain. Notes : The value of "200" is default value from chart option
  2. Hi, I am using fusion time with and MySQL database to populate the time series chart, i would like to allow user to pick desired date within 5 weeks on the custom range selector (calendar control), and i am using for loop at the back end to retrieve the huge data from database so it definitely will consume long time to render the chart (around 1 minute), just want to ask any advise if any other method to populate the json string to load the chart in fast? Thanks! Using client As WebClient = New WebClient() schema = ("[{name:'SensorName',type:'string'}, {name: 'Time',type:'date', format:'%Y-%m-%d %H:%M:%S %p'}, {name:'Particle Counter Value',type:'number'}] ") selectPCounter = " SELECT * FROM tbtestdata where sampledate >= '2020-12-24' AND sampledate <= '2021-01-27' " Dim dt As New DataTable dt = conn.query(selectPCounter) If dt.Rows.Count > 0 Then data.Append("[") For i As Integer = 0 To dt.Rows.Count - 1 If i <> dt.Rows.Count - 1 Then data.Append("['" + dt.Rows(i)("SensorName").ToString + "','" + dt.Rows(i)("SampleDate").ToString + " " + dt.Rows(i)("SampleTime").ToString + "'," + "'" + dt.Rows(i)("SampleValue").ToString + "'],") Else data.Append("['" + dt.Rows(i)("SensorName").ToString + "','" + dt.Rows(i)("SampleDate").ToString + " " + dt.Rows(i)("SampleTime").ToString + "'," + "'" + dt.Rows(i)("SampleValue").ToString + "']]") End If Next End If End Using Dim fusionTable As FusionTable = New FusionTable(schema, data.ToString) Dim timeSeries As TimeSeries = New TimeSeries(fusionTable) timeSeries.AddAttribute("caption", "{ text:'Particle Counter' }") timeSeries.AddAttribute("subcaption", "{text:'Daily'}") timeSeries.AddAttribute("chart", "{exportEnabled:'1'}") timeSeries.AddAttribute("yAxis", "[{plot: {value: 'Particle Counter Value',type:'line'},title: 'PC', series: 'SensorName' }]") Dim chart As Chart = New Chart("timeseries", "first_chart", "1600", "700", "json", timeSeries) ltChart.Text = chart.Render()
  3. Hi there I've been diving into forum and docs, but I think I'm going in the wrong direction. I'm trying to show a multi-series line chart. Only 3 data in the query: date, device and data. The format in query is like that: devicename (string) | date (datetime)| data (float) What I want is to show a line for every device and see data along the time. I've seen several examples with xml, but none with json. Could anyone show me an example of something similar? I know there must be lots of them, but I cannot find even one. My main problem is arrange the json. I have no experience with it but I think I coud use an example as a guide. Thanks for all!
  4. Hi all FusionCharts folks, I'm trying to populate GANTT chart by database (PHP+MySQL). I was able to implement my own script based on the general method based on the conceptual sequence: 1) Execute queries on database 2) If results is not empty... 3)...proceed with "array_push" to concatenate data to be displayed by the chart. The code below implements the above sequence: // Execute the query, or else return the error message. $result_CATEGORIES = mysqli_query($dbhandle, $strQuery_CATEGORIES); //prepare categories $arrData["categories"] = array(); $category = array(); // Push the data into the category array while($row = mysqli_fetch_array($result_CATEGORIES)) { array_push($category, array("label"=>$row["abbr_mese"], "start"=>$row["frm_inizio_mese"], "end"=>$row["frm_fine_mese"])); } echo "<pre>"; echo "ARRAY CATEGORIES CONTENTS"."<p>"; echo print_r ($category); echo "</pre>"; array_push($arrData["categories"], array("category"=>$category)); After repeated excecution of the above code for all the data-section required by the GANTT chart the final assembled JSONencoded string is the following: {"chart":{"renderAt:":"chart-1","dateformat":"mm\/dd\/yyyy","caption":"Commesse Associate al Collaboratore","subCaption":"Assistenza al Planning","theme":"fusion"},"categories":[{"category":[{"label":"GEN","start":"01\/01\/2019","end":"01\/31\/2019"},{"label":"FEB","start":"02\/01\/2019","end":"02\/28\/2019"},{"label":"MAR","start":"03\/01\/2019","end":"03\/31\/2019"},{"label":"APR","start":"04\/01\/2019","end":"04\/30\/2019"},{"label":"MAG","start":"05\/01\/2019","end":"05\/31\/2019"},{"label":"GIU","start":"06\/01\/2019","end":"06\/30\/2019"},{"label":"LUG","start":"07\/01\/2019","end":"07\/31\/2019"},{"label":"AGO","start":"08\/01\/2019","end":"08\/31\/2019"},{"label":"SET","start":"09\/01\/2019","end":"09\/30\/2019"},{"label":"OTT","start":"10\/01\/2019","end":"10\/31\/2019"},{"label":"NOV","start":"11\/01\/2019","end":"11\/30\/2019"},{"label":"DIC","start":"12\/01\/2019","end":"12\/31\/2019"}]}],"processes":[{"process":[{"headerText":"SIL"},{"headerText":"BIOM"},{"headerText":"BIOM"}]}],"tasks":[{"task":[{"start":"01\/15\/2019","end":"01\/28\/2019"},{"start":"02\/07\/2019","end":"03\/21\/2019"},{"start":"02\/20\/2019","end":"05\/11\/2019"}]}]} I checked against it and it is (at least as per its syntax) perfectly valid JSON Here it is the same JSON string nicely formatted: { "chart": { "renderAt:": "chart-1", "dateformat": "mm\/dd\/yyyy", "caption": "Commesse Associate al Collaboratore", "subCaption": "Assistenza al Planning", "theme": "fusion" }, "categories": [{ "category": [{ "label": "GEN", "start": "01\/01\/2019", "end": "01\/31\/2019" }, { "label": "FEB", "start": "02\/01\/2019", "end": "02\/28\/2019" }, { "label": "MAR", "start": "03\/01\/2019", "end": "03\/31\/2019" }, { "label": "APR", "start": "04\/01\/2019", "end": "04\/30\/2019" }, { "label": "MAG", "start": "05\/01\/2019", "end": "05\/31\/2019" }, { "label": "GIU", "start": "06\/01\/2019", "end": "06\/30\/2019" }, { "label": "LUG", "start": "07\/01\/2019", "end": "07\/31\/2019" }, { "label": "AGO", "start": "08\/01\/2019", "end": "08\/31\/2019" }, { "label": "SET", "start": "09\/01\/2019", "end": "09\/30\/2019" }, { "label": "OTT", "start": "10\/01\/2019", "end": "10\/31\/2019" }, { "label": "NOV", "start": "11\/01\/2019", "end": "11\/30\/2019" }, { "label": "DIC", "start": "12\/01\/2019", "end": "12\/31\/2019" }] }], "processes": [{ "process": [{ "headerText": "SIL" }, { "headerText": "BIOM" }, { "headerText": "BIOM" }] }], "tasks": [{ "task": [{ "start": "01\/15\/2019", "end": "01\/28\/2019" }, { "start": "02\/07\/2019", "end": "03\/21\/2019" }, { "start": "02\/20\/2019", "end": "05\/11\/2019" }] }] } Nonetheless, fed by the above JSON encoded string, the rendering of the chart keeps returning the message "No Data To Display". I did my investigations and discovered that stripping away from the JSONencoded string the first "[" and the last "]" from the sections "processes" and "tasks" the chart renders as a breeze with proper data and labels in place. It looks like the chart doesn't want these sections (which of course follows the main one "categories") marked as an array. May be the problem is not in the terms I have just stated but I'm looking for a solution. Thank you in advance, I greatly appreciate FC, any help is more than wellcome!
  5. Hello everyone, I'm developing an APP that makes graphics based in data from MySQL, my problem is that when I bring the data at 100% zoom in chrome, in line charts the plottooltext is not showing, when zoom out, the plottooltext works 1st image, 100% zoom 2nd image, 50% zoom both in Google Chrome any hopes on this to work?
  6. 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!
  7. Piechart and MySQL

    Hi, I am trying to create a piechart under the following circumstances: My each row in my table contains a gender. I want to be able to sum up the number of males and females and then plot that in a pie chart. The query that I am using SELECT SUM(gender = 'male') AS male, SUM(gender = 'female') AS female FROM markers; presents 2 columns (male and female) with a count below. How is it possible to get this into the array for the chart seeing that the data required should be by row rather than column? Query Results: | male | female | | 23 | 43 | Should be | male | 23 | | female | 43 | Thanks Steve
  8. 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.
  9. hi i have problem with MSLine chart. here is my database look like: ------------|--------------------------|----------------------------| id | Generator | Date | -------------------------------------------------------------------| 1 | Plant 1 | 2015-12-01 | ------------------------------------------------------------------- 2 |Plant 2 | 2015-12-02 | ------------------------------------------------------------------- 3 | Plant 1 | 2015-12-03 | ------------------------------------------------------------------- here is mycode: <?php $q = intval($_GET['q']); $strQueryCategories = "select distinct DATE_FORMAT(,'%c-%d-%Y') as DatePro from tblmarketable where ae = 'juan' and YEAR(date) = YEAR(NOW()) and MONTH(date) = '".$q."' order by DatePro"; $resultCategories = mysql_query($strQueryCategories) or die(mysql_error()); $strQueryData = "SELECT ref, date, gen, SUM(amount) as amount from tblmarketable where ae = 'juan' and YEAR(date) = YEAR(NOW()) and MONTH(date) = '".$q."' group by gen, ref, date order by gen"; $resultData = mysql_query($strQueryData) or die(mysql_error()); $strXML = "<graph legendPostion='' caption='Marketable Sales' subCaption='By Juan' xAxisName='Group By Reference No: ' yAxisName='Amount' showValues='0' formatNumberScale='0' rotateValues='1' theme='fint'>"; $strXML .= buildCategories ($resultCategories, "DatePro"); $strXML .= buildDatasets ( $resultData, "amount", "gen"); $strXML .= "</graph>"; echo renderChartHTML("Charts/MSLine.swf", "", $strXML, "FactorySum", 600, 300, false, true); mysql_free_result($resultCategories); mysql_free_result($resultData); function buildCategories ( $result, $labelField ) { $strXML = ""; if ($result) { $strXML = "<categories>"; while($ors = mysql_fetch_array($result)) { $strXML .= "<category label='" . $ors[$labelField]. "'/>"; } $strXML .= "</categories>"; } return $strXML; } function buildDatasets ($result, $valueField, $controlBreak ) { $strXML = ""; if ($result) { $controlBreakValue =""; while( $ors = mysql_fetch_array($result) ) { echo" "; if( $controlBreakValue != $ors[$controlBreak] ) { $controlBreakValue = $ors[$controlBreak]; $strXML .= ( $strXML =="" ? "" : "</dataset>") . ( "<dataset seriesName='" . $controlBreakValue . "'>" ) ; } $strXML .= "<set value='" . $ors[$valueField] . "'/>"; } $strXML .= "</dataset>"; } return $strXML; } ?> the PLANT 1 (id 1) is correct in the position date, but the problem is the PLANT 2 date become 2015-12-01 that shows in a graph instead of 2015-12-02 and the PLANT 1 (id 3) date become 2015-12-02 instead of 2015-12-03 anyone can help me? regards.. -
  10. Hi, Anyone who need FusionChart DashBoard using Mysql/php Application feel free to hire me
  11. -Excellent knowledge and management java script 's including framework -Experience in design and development of websites in HTML -SQL Server developer 2005, 2008 , or express edition -Management and administration of DB in MySQL, Postgres , SQL . -Design And implementation of data models in environments Datawarehouse -Data Marts -Design And knowledge of ETL quality information processes, analytical and enrichment Creation and management of databases: physical models , business models and logical models -Construction Of modules information exploitation: Dashboards , flexible systems mark ( OLAP ) , reporting systems , systems of rules and data mining. Open Salary Location: México City, Santa Fe Project for two-months [email protected]
  12. Hello everybody here , i'm just new here and this is my first chart i'm gonna to work with , in fact i need to get the chart's data from mysql data base any idea to start that instead of xml data????
  13. I would like to display columns with the same color. The following input does not generate "Color=FA8258" inside the <set> Please advise! $FC->addDataFromDatabase($result, "earned", "date","Color=FA8258", "earned_total.php?uid=##uid##"); Regards, Dimedrol
  14. Back Button not working

    Hi All, I have integrated Fusion chart trail version to My cakephp project and I have passed the datas from database to fusion charts. Its working fine. But when I click on year which is goes to Month, In that I didn't get back button. How can I integrate the Back Button.Please advice me. Thanks in Advance.
  15. Fusion chart with php

    Can anybody give me a sample example of php+Column3d fusion chart with json data. I am facing problem with how to run. If i run php then it shows code not bar chart. Please attach a sample example for php with Fusion chart and how to run it??? Thanks