File "pipo.php"

Full Path: /home/analogde/www/Bookmarks/CHESS_ON/pipo.php
File size: 3.49 KB
MIME-type: text/html
Charset: utf-8

<!doctype html>
<html>
<head>
    <!--
	<script src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script>
	-->
	<script src="Charts_2022/js/fusioncharts.js"></script>
	
</head>
<body>
    <div id="container"></div>

	
    <script>

	/*
	FusionCharts.ready(function () {
            // chart instance
            var chart = new FusionCharts({
                type: "column2d",
                renderAt: "chart-container", // container where chart will render
                width: "600",
                height: "400",
				
				dataFormat: 'xmlurl',
				dataSource: 'data.xml'
				
                //dataFormat: "json",
                /*dataSource: {
                    // chart configuration
                    chart: {
                        caption: "Countries With Most Oil Reserves [2017-18]",
                        subcaption: "In MMbbl = One Million barrels"
                    },
                    // chart data
                    data: [
                        { label: "Venezuela", value: "290000" },
                        { label: "Saudi", value: "260000" },
                        { label: "Canada", value: "180000" },
                        { label: "Iran", value: "140000" },
                        { label: "Russia", value: "115000" },
                        { label: "UAE", value: "100000" },
                        { label: "US", value: "30000" },
                        { label: "China", value: "30000" }
                    ]
                }*/
 
	/*}).render();
        });*/
		
		// https://www.fusioncharts.com/dev/fusiontime/getting-started/create-your-first-chart-in-fusiontime
		
//const URL_DATA = 'https://raw.githubusercontent.com/fusioncharts/dev_centre_docs/master/assets/datasources/fusiontime/examples/online-sales-single-series/data.json';
//const URL_SCHEMA = 'https://raw.githubusercontent.com/fusioncharts/dev_centre_docs/master/assets/datasources/fusiontime/examples/online-sales-single-series/schema.json';

const URL_DATA = 'elo.json';
const URL_SCHEMA = 'elo_infos.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
  
  new FusionCharts({
    type: 'timeseries',
    renderAt: 'container',
    width: "90%",
    height: 490,
    dataSource: {
      data: fusionTable,
      chart: {
  	  showToolTip: 0,
	  yAxisMaxValue: 250,
      yAxisMinValue: 6500,
	  xAxisName: 'Quarter',
      exportEnabled: 0,
	  formatNumberScale: 0
      },
      caption: {
        text: 'Evolution de votre score ELO'
      },
      yAxis: {
        "plot": {
          "value": "ELO",
          "type": "line"
        },
      }
    }
  }).render();

});
		
		//  https://www.fusioncharts.com/fusiontime/examples/join-missing-data?framework=javascript
		
		// https://www.fusioncharts.com/fusiontime/examples/plotting-two-variables-measures?framework=javascript
	
	//https://www.fusioncharts.com/fusiontime/examples/plotting-multiple-series-on-time-axis?framework=javascript
	
    </script>
	
	
	

<?php

	echo "<br><br>";
	echo " xxxxxx TEST patoche blabla ";
	echo "<br><br>";

?>	
	
</body>



</html>