How to make a 3D chart in PHP?

3D chart in PHP

Making a 3D chart in PHP has never been easier before, especially when we are talking about UI less environment such as Linux, Apache, MySQL and PHP environment. Fortunately, there is a data visualization with drag and drop tool available which is built in PHP, HTML, Javascript and Graphic Library.


Creating a dynamic 3D chart in PHP using Dashboard Builder.

Dashboard Builder presents 3D line chart for the users having no specialization or technical knowledge. Dashboard Builder makes users to able to connect a huge range of database using PDO, the most widely used data connection for retrieving data in open source platform such as MySQL, MS SQL, SQLite, PostgreSQL, Sybase and Cubrid, CSV and MS EXCEL files. The users can download their 3D charts in PNG image format as well. Dashboard Builder has the most powerful drag-and-drop features to create 3D chart in a minutes.

Our 3D charts are pure dynamic, which uses D3.js library, the most widely used JavaScript library for presenting dynamic and interactive data in the browsers using SVG and HTML5 standards. These charts are fully responsive to fit in PC, mobile phone and tablets devices using the most powerful CSS and JQuery framework.

Getting Started

In this example, we will be creating a simple 3D chart using MS Excel and then generating PHP code for our web application. To do this, we will be going to demonstrate with our Dashboard Builder tool. Following are the requirements to install and run the Dashboard Builder.

Requirements

This open source dashboard can be installed any platforms like Windows, Linux and Ubuntu or any other platforms support Apache, Nginx etc.

  • PHP Version 7.2 or later
  • Apache 2 or later
  • Windows 7 or later /Linux 3 or later
  • Firefox 52, Chrome 57, IE 8

Installation

There is a Free version of Dashboard Builder is available for trail bases

3D chart example

Before getting started we have to make sure that you Web Server like Apache, Nginx, etc., in place and is configured to display the folders which will contain dashboard with Read-Write permission to the folders and sub-folders of dashboardbuilder. To do so, you may use chmod -R 777 dashbboardbuilder-v3-FREE and check your browser inspector/console to make sure that there isn't any error being reported, and all the Dashboard builder files are being loaded properly.


Create your first 3D chart

Launching the Dashboard Builder tool

Welcome Screen

This is the main panel of our Dashboard Builder tool. This is a HTML5 based fully responsive interface built in PHP, HTML, JavaScript and CSS. The interface has a minimal design with a drag-and-drop feature that allows you to add multiple chart panel to customize the dashboard on according to the way you want.

Upload your Excel data to Dashboard Builder

In this tutorial, we will be uploading our Excel data to the Dashboard Builder. You can download the file here in XLSX format. Now Click the Database icon

  • Under the sub tab of Upload, click browser or drag the excel file and hit the Save changes button as shown in the following screen.

Upload excel file

  • A green Excel icon
    will appear when your file is successfully uploaded.

Setting your chart preference

With this great Dashboard Builder you have the freedom to select your data for X and Y axis and change your chart type, define color, define legend name, chart properties such as caption of your chart, title for x and y axis, set width and height of your chart, horizontal and vertical layouts and many more in a single click.

  • To do so, select the gear icon for your Dashboard preference.

Database Connected

3D Chart Settings

  • The following screen will appear showing the data fetched from the Excel file.

3D Chart setting

  • Now, select "3D+Line" chart from the drop down list of type
  • Select "X" from the drop down list of X
  • Select "Y" from the drop down list of Y
  • And select "Z" from the drop down list of Z
  • Click Save Changes

  • You may adjust the size and the position of the Chart Panel by draging it's corncer.

  • Now Click the Generate   button

Chart Preference 4

  • PHP code for the chart will automatically generate, you may copy past this code to your PHP application.

 

 

MIT License

This auto-generated PHP code for our 3D chart is released under MIT license, the most popular software license on GitHub, ahead of any GPL variant and other free and open-source software (FOSS) licenses.

This MIT license puts very limited restriction on reuse and has, therefore, an excellent license compatibility. This license permits you to reuse within proprietary the source code generated by our Dashboard Builder, provided that all copies of the source code include a copy of the MIT License terms and the copyright notice. This license is also compatible with many copyleft licenses, such as the GNU General Public License (GPL). The source code generated by this tool, can be integrated into GPL software.

The auto-generated PHP code allows you to customize as per your desire needs and can be used an anywhere you want. You can find the complete information about the license here

 

Conclusion

Now we have PHP code for our 3D chart which we can use with any web application that was customized to fit the requirements of the web design. Dashboard Builder also offers free and paid plans. You can also download Dashboard Builder FREE version. The code for Dashboard Builder can be found on GitHub under this license

Best of all, with our Standard and Enterprise licenses include 100% source code, for you to enhance the functionality or incorporate the Open Source Dashboard into your web application or any PHP software solutions/products, analytics/data science/data warehouse enterprise systems or Joomla, Wordpress or Drupal sites.

All editions of our Open Source Dashboard series are still fully functional, for sale and supported and provides increasing levels of support to address the queries of users and developers.

Dashboard Builder can also be implemented using an online API where you don’t have to mix with PHP code. The online API uses universal HTML code which can be used in any platform. The data will be added or retrieved from the database using the API. You may find more information about the Online Dashboard.


You may want to take a look at our complete documentation and video tours of the latest version along with a live tour of user interface and step by step instructions for performing key features.


How helpful was this information?