I am creating plugin to display some counts with pie chart using this http://www.jpowered.com/
Now everything is fine but I want to connect it with database, where count will be pulled from db. They system is using three different files.
- HTML to render output
- data.txt to get value
- config.txt this is a configuration file for look, size etc for pie chart
HTML code is as below
<img src="../../graph/pie-chart.php?
data=../demo/piechart/data4.txt&
config=../demo/piechart/config4.txt"
width=700
height=400 />
Now I want to convert both txt files into php so I can connect with the database.
data.txt to data.php to pull all data from database config.txt to allow some customization from plugin setting panel
For better understanding I am placing both text file some code.
data.txt
data1series1: 150
data2series1: 27
data3series1: 80
data1series2: 21000
data2series2: 30000
data3series2: 17000
config.txt
<!-- Chart Characteristics -->
width: 700
height: 400
ndecplaces: 0
pecentndecplaces: 0
depth3d: 20
3dangle: 40
backgroundcolor: #ffffff
<!-- Chart Switches -->
3d: false
displayPercentages: true
labellines: true
quality: very high
<!-- Popup segment Value Pre & Post Symbols -->
valuepresym: $
<!-- thousand seperater -->
thousandseparator: ,
<!-- Segment Labels -->
segmentlabels: true
segmentlabelfont: Arial
segmentlabelfontsize: 8
segmentlabelfontbold: false
segmentlabelfontitalic: false
segmentlabelcolor: #666666
... ----->continue to more config settings
Finally: I want to convert these two files data.txt and config.txt to php where I can connect to the database. I have tried to convert both and data.txt I found working but config.txt doesn't taking affect inline php code and ignoring entire property assigned through php.
Any solution for this? I am okay with any other way or other plugin which can solve my issue by allowing php to connect the database and config setup with variables.
I hope this information would be enough but if you need any more info please let me know. Thanks!