File "debug_chart.php"

Full Path: /home/analogde/www/WORDPRESS/HDL/CHESS_2022/debug_chart.php
File size: 2.11 KB
MIME-type: text/x-php
Charset: utf-8

<?php

$strJsonFileContents = file_get_contents("titi.json");
echo $strJsonFileContents;

?>

<!doctype html>
<html>
<head>
    
	<script src="Charts_2022/js/fusioncharts.js"></script>
	
</head>
<body>
    <div id="container"></div>

	
    <script>

	
const URL_DATA = 'elo_data.json';
const URL_SCHEMA = 'schema.json';

// formatNumberScale 
// yFormatNumberScale 
// yaxismaxvalue

const jsonify = res => res.json();
const dataFetch = fetch(URL_DATA).then(jsonify);
const schemaFetch = fetch(URL_SCHEMA).then(jsonify);

Promise.all([dataFetch, schemaFetch]).then(([data, schema]) => {
  var fusionTable = new FusionCharts.DataStore().createDataTable(data, schema);

  // https://www.fusioncharts.com/dev/chart-guide/chart-configurations/tool-tips
  // https://apps1.talonsystems.com/tseta/graphs/fc3_2/FusionCharts_Developer/Contents/index.html?ChartSS/Combi3D.html
  
  // https://jsfiddle.net/srishti_fc/xn6dzswh/18/
  
  //https://forum.fusioncharts.com/topic/27034-formatnumberscale-in-timeseries-chart/
  
  new FusionCharts({
    type: 'timeseries',
    renderAt: 'container',
    width: "90%",
    height: 490,
    dataSource: {
      data: fusionTable,
      chart: {
  	  showToolTip: 0,
	  yAxisMaxValue: 9500,
      yAxisMinValue: 1000,
	  formatNumber: 0 ,
	  yFormatNumberScale : 0,
	  formatNumberScale : 0,
	  xAxisName: 'Quarter',
      exportEnabled: 0,
      },
      caption: {
        text: 'Evolution de votre score ELO'
      },
      /*yAxis: {
        "plot": {
          "value": "ELO",
		  "connectNullData": "true",
		  "formatNumber": "0",
		  "yAxisMaxValue": "9500",
			"yAxisMinValue": "1000",
		  "yFormatNumberScale" : "0",
		  "formatNumberScale" : "0",
          "type": "line"
        }
		
		
      }*/
	  
	  yAxis: [{
      plot: [{
        value: 'Value',
        connectNullData: true,
        type: 'line',

      }],
      format: {
        defaultFormat: 0,
      }
    }]
    }
  }).render();

});
	
    </script>
	
	
	

<?php

	echo "<br><br>";
	echo " on going ";
	echo "<br><br>";

?>	
	
</body>



</html>