Giter VIP home page Giter VIP logo

php-wrapper's Issues

Chart type not supported

Hello All

I am trying to practice with "Creating Charts with Data from a Database"
I am getting the "Chart type not supported" error when I run the code.

I just changed the namedb and script "fusioncharts.js" by adding type.
What could be the problem?

Thanks in advance!

There is my code:

connect_error) { exit("There was an error with your connection: ".$dbhandle->connect_error); } ?> <title>FusionCharts XT - Column 2D Chart - Data from a database</title>
<!-- You need to include the following JS file to render the chart.
When you make your own charts, make sure that the path to this JS file is correct.
Else, you will get JavaScript errors. -->

<script type="text/javascript" src="fusioncharts.js"></script>
// Form the SQL query that returns the top 10 most populous countries $strQuery = "SELECT Name, Population FROM Country ORDER BY Population DESC LIMIT 10"; // Execute the query, or else return the error message. $result = $dbhandle->query($strQuery) or exit("Error code ({$dbhandle->errno}): {$dbhandle->error}"); // 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" => "Top 10 Most Populous Countries", "paletteColors" => "#0075c2", "bgColor" => "#ffffff", "borderAlpha"=> "20", "canvasBorderAlpha"=> "0", "usePlotGradientColor"=> "0", "plotBorderAlpha"=> "10", "showXAxisLine"=> "1", "xAxisLineColor" => "#999999", "showValues" => "0", "divlineColor" => "#999999", "divLineIsDashed" => "1", "showAlternateHGridColor" => "0" ) ); $arrData["data"] = array(); // Push the data into the array while($row = mysqli_fetch_array($result)) { array_push($arrData["data"], array( "label" => $row["Name"], "value" => $row["Population"] ) ); } /*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" , 600, 300, "chart-1", "json", $jsonEncodedData); // Render the chart $columnChart->render(); // Close the database connection $dbhandle->close(); } ?> <div id="chart-1"><!-- Fusion Charts will render here--></div>

Unable to find the container DOM element

I had use this code:

<script type="text/javascript" src="js/fusioncharts.js"></script> <script type="text/javascript" src="js/themes/fusioncharts.theme.ocean.js"></script> render(); ?>

Got the following error.

Composer Support

There is an issue (#6) from 2019 requesting Composer support, which was never implemented.

Could we please revisit this super low hanging fruit request?

It appears you guys already have a Packagist account (https://packagist.org/packages/fusioncharts/), so it should be really simple to add this repo as well.

Thanks for the consideration.

Testing Wrapper

And getting an error:

fusioncharts.js:77
Uncaught Error: #03091456 ex1.render() Error >> Unable to find the container DOM element.
at C.core.render (fusioncharts.js:77)
at Function. (test.php:45)
at fusioncharts.js:47

Thoughts?

Empty Page

Hello,
I have all the required files, the latest engine and themes and js files loaded.

yet the page still displays blank with the examples you have provided.

Any help is greatly appreciated.

Missing containerBackgroundOpacity and styles

Hi,

It seems the PHP wrapper has been renewed. The old one had options for setting the 'containerBackgroundOpacity' and adding styles, this one doesn't. More might be missing, which I haven't noticed yet.
Any plan on making the PHP wrapper more complete? (the wrapper might be open source, but it is needed for a product that I bought).

Chart type is not supported

My php version is above 5, when is tried the sample code chart is nt appearing with error as "chart type is not supported" please tell me the solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.