Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Bodim.lk out now !
Manoj Suranga Bandara
Updated:
Today at 3:05 AM
Power Lifting Lever Belt
SkullVamp
Updated:
Jun 13, 2026
Ad icon
port.lk Domain for sale
Lankan-Tech
Updated:
Jun 13, 2026
Colombo
Kaduwela - Two Storey House for Sale
dilrasan
Updated:
Jun 11, 2026
Ad icon
Wechat qr verification
Pawan2005
Updated:
Jun 11, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
PHP Charts
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="විල්සන් මාමා" data-source="post: 16715679" data-attributes="member: 397789"><p><span style="font-size: 15px">මචන්ලා මට php වලින් charts generate කරන්න ඕනේ </span></p><p><span style="font-size: 15px">highcharts හොදයි නේද</span></p><p><span style="font-size: 15px">&#133;මේක පවිච්චි කරන කවුරුහරි ඉන්නවද</span></p><p><span style="font-size: 15px">&#133;මට පොඩ්ඩක් කියල දෙන්න පුලුවන්ද</span></p><p><span style="font-size: 15px">&#133;mysql database එකකින් ගන්න data set එකක් highcharts වලට දෙන්නෙ කොහමඩ කියලා</span></p><p><span style="font-size: 15px"></span></p><p></p><p>[CODE]</p><p>//file name is data.php</p><p><?php</p><p>require_once '../includes/database.php';</p><p>require_once '../includes/customer.php';</p><p>$customers= Customer::find_by_sql("SELECT firstname,monthly_income FROM customer");</p><p>$rows=array();</p><p>foreach ($customers as $customer) {</p><p> $row[0]=$customer->firstname;</p><p> $row[1]=$customer->monthly_income;</p><p> array_push($rows,$row);</p><p>} </p><p></p><p></p><p>print json_encode($rows, JSON_NUMERIC_CHECK);</p><p>?>[/CODE]</p><p>උඩ code එකෙන් මෙන්න මේ වගේ output එකක් දෙනවා </p><p>[["Michael",55000],["Praveen",50000],["Nuwan",120000],["Thilan",100000]]</p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">ඊට පස්සේ මේක මෙන්න මේ වගේ html එකක paste කලාම මුකුත් පෙන්නන්නේ නැහැ නේ </span></p><p><span style="font-size: 15px">මේ යට තියෙන code මම එහෙන් පිටින්ම වෙන තැනකින් ගත්තේ </span></p><p><span style="font-size: 15px">මට මේක වැඩිය තේරෙන්නේ නැහැ </span></p><p><span style="font-size: 15px">කාට හරි කියන්න පුලුවන්ද මොකක්ද කරන්න ඕනේ මේකෙන් chart එක පෙන්න ගන්න </span></p><p><span style="font-size: 15px">මේකේ එහෙම වෙනස් කරන්න ඕන තැන් මොනාද </span></p><p><span style="font-size: 15px"></span></p><p></p><p>[CODE]<!DOCTYPE HTML></p><p><html></p><p> <head></p><p> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></p><p> <title>Highcharts Pie Chart</title></p><p> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script></p><p> <script type="text/javascript"></p><p> $(document).ready(function() {</p><p> var options = {</p><p> chart: {</p><p> renderTo: 'container',</p><p> plotBackgroundColor: null,</p><p> plotBorderWidth: null,</p><p> plotShadow: false</p><p> },</p><p> title: {</p><p> text: 'Customer Vs Income'</p><p> },</p><p> tooltip: {</p><p> formatter: function() {</p><p> return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %';</p><p> }</p><p> },</p><p> plotOptions: {</p><p> pie: {</p><p> allowPointSelect: true,</p><p> cursor: 'pointer',</p><p> dataLabels: {</p><p> enabled: true,</p><p> color: '#000000',</p><p> connectorColor: '#000000',</p><p> formatter: function() {</p><p> return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %';</p><p> }</p><p> }</p><p> }</p><p> },</p><p> series: [{</p><p> type: 'pie',</p><p> name: 'Browser share',</p><p> data: []</p><p> }]</p><p> }</p><p> </p><p> $.getJSON("data.php", function(json) {</p><p> options.series[0].data = json;</p><p> chart = new Highcharts.Chart(options);</p><p> });</p><p> </p><p> </p><p> </p><p> }); </p><p> </script></p><p> <script src="http://code.highcharts.com/highcharts.js"></script></p><p> <script src="http://code.highcharts.com/modules/exporting.js"></script></p><p> </head></p><p> <body></p><p> <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div></p><p> </body></p><p></html></p><p>[/CODE]</p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">එහෙම නැත්තම් සාමාන්යෙන් මොනාද පාවිච්චි කරන්නේ php වලින් charts generate කරන්න </span></p><p><span style="font-size: 15px">පොඩි උදව්වක් දෙන්න </span></p><p><span style="font-size: 15px">බම්ප් හරි කරන්න </span></p><p><span style="font-size: 15px">&#133;</span></p></blockquote><p></p>
[QUOTE="විල්සන් මාමා, post: 16715679, member: 397789"] [SIZE=4]මචන්ලා මට php වලින් charts generate කරන්න ඕනේ highcharts හොදයි නේද …මේක පවිච්චි කරන කවුරුහරි ඉන්නවද …මට පොඩ්ඩක් කියල දෙන්න පුලුවන්ද …mysql database එකකින් ගන්න data set එකක් highcharts වලට දෙන්නෙ කොහමඩ කියලා [/SIZE] [CODE] //file name is data.php <?php require_once '../includes/database.php'; require_once '../includes/customer.php'; $customers= Customer::find_by_sql("SELECT firstname,monthly_income FROM customer"); $rows=array(); foreach ($customers as $customer) { $row[0]=$customer->firstname; $row[1]=$customer->monthly_income; array_push($rows,$row); } print json_encode($rows, JSON_NUMERIC_CHECK); ?>[/CODE] උඩ code එකෙන් මෙන්න මේ වගේ output එකක් දෙනවා [["Michael",55000],["Praveen",50000],["Nuwan",120000],["Thilan",100000]] [SIZE=4] ඊට පස්සේ මේක මෙන්න මේ වගේ html එකක paste කලාම මුකුත් පෙන්නන්නේ නැහැ නේ මේ යට තියෙන code මම එහෙන් පිටින්ම වෙන තැනකින් ගත්තේ මට මේක වැඩිය තේරෙන්නේ නැහැ කාට හරි කියන්න පුලුවන්ද මොකක්ද කරන්න ඕනේ මේකෙන් chart එක පෙන්න ගන්න මේකේ එහෙම වෙනස් කරන්න ඕන තැන් මොනාද [/SIZE] [CODE]<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Highcharts Pie Chart</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { var options = { chart: { renderTo: 'container', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: 'Customer Vs Income' }, tooltip: { formatter: function() { return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %'; } }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, color: '#000000', connectorColor: '#000000', formatter: function() { return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %'; } } } }, series: [{ type: 'pie', name: 'Browser share', data: [] }] } $.getJSON("data.php", function(json) { options.series[0].data = json; chart = new Highcharts.Chart(options); }); }); </script> <script src="http://code.highcharts.com/highcharts.js"></script> <script src="http://code.highcharts.com/modules/exporting.js"></script> </head> <body> <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div> </body> </html> [/CODE] [SIZE=4] එහෙම නැත්තම් සාමාන්යෙන් මොනාද පාවිච්චි කරන්නේ php වලින් charts generate කරන්න පොඩි උදව්වක් දෙන්න බම්ප් හරි කරන්න …[/SIZE] [/QUOTE]
Insert quotes…
Verification
Hata thunen beduwama keeyada? (60 bedeema thuna)
Post reply
Top
Bottom