PHP create financial chart php - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

create financial chart using php


 212

Show ResultPHP


2

<?php

$dataPoints = array(
array("y" => 1330, "label" => "2013"),
array("y" => 2500, "label" => "2014"),
array("y" => 1450, "label" => "2015"),
array("y" => 3256, "label" => "2016"),
array("y" => 4500, "label" => "2017"),
array("y" => 2500, "label" => "2018")
);

$dataPoints2 = array(
array("y" => 1360, "label" => "2013"),
array("y" => 2570, "label" => "2014"),
array("y" => 1480, "label" => "2015"),
array("y" => 3600, "label" => "2016"),
array("y" => 3530, "label" => "2017"),
array("y" => 2123, "label" => "2018")
);

?>
<!DOCTYPE HTML>
<html>
<head>
<script>
window.onload = function () {

var chart = new CanvasJS.Chart("chartContainer", {
title: {
text: "Your text"
},
axisY: {
title: "Your title"
},
axisY2: {
title: "Your title"
},
data: [{
type: "line",
yValueFormatString: "$##0.00",
dataPoints: <?php echo json_encode($dataPoints, JSON_NUMERIC_CHECK); ?>
},
{
type: "line",
yValueFormatString: "$##0.00",
dataPoints: <?php echo json_encode($dataPoints2, JSON_NUMERIC_CHECK); ?>
}]
});
chart.render();

}
</script>
</head>
<body>
<div id="chartContainer" style="height: 370px; width: 100%;"></div>
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>
</body>
</html>


By     Created   
The power of the user (%)
5%



The most helpful PHP solutions

detect browser phpdetect browser phpPHP

Click to see more ...

  3.7K     388

create QR code phpcreate QR code phpPHP

Click to see more ...

  2.3K     274

delete array item phpdelete array item phpPHP

Click to see more ...

  1.9K     231

create relative date phpcreate relative date phpPHP

Click to see more ...

  1.5K     216

detect ie phpdetect ie phpPHP

Click to see more ...

  1.2K     209

get current url phpget current url phpPHP

Click to see more ...

  816     189

Get real client country using php ?Get real client country using php ?PHP

Click to see more ...

  637     168

get meta tag phpget meta tag phpPHP

Click to see more ...

  556     129

drag and drop upload file using phpdrag and drop upload file using phpPHP

Click to see more ...

  1.1K     107

detect speed internet phpdetect speed internet phpPHP

Click to see more ...

  538     106