Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <title>Hye Source</title>
- <meta name="description" content="Alhusna Apps">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no">
- </head>
- <body>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
- <script src="http://code.highcharts.com/highcharts.js"></script>
- <script src="http://code.highcharts.com/modules/exporting.js"></script>
- <script src="https://rawgit.com/phpepe/highcharts-regression/master/highcharts-regression.js"></script>
- <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
- <script>
- $(function () {
- $('#container').highcharts({
- chart: {
- type: 'scatter',
- zoomType: 'xy'
- },
- title: {
- text: 'Polynomial regression - Fuzzyparadoxx Polynomial challenge'
- },
- subtitle: {
- text: 'Source: Hye Source 2019'
- },
- xAxis: {
- title: {
- enabled: true,
- text: 'Height (cm)'
- },
- startOnTick: true,
- endOnTick: true,
- showLastLabel: true
- },
- yAxis: {
- title: {
- text: 'Weight (kg)'
- }
- },
- legend: {
- layout: 'vertical',
- align: 'left',
- verticalAlign: 'top',
- x: 100,
- y: 70,
- floating: true,
- backgroundColor: '#FFFFFF',
- borderWidth: 1
- },
- plotOptions: {
- scatter: {
- marker: {
- radius: 5,
- states: {
- hover: {
- enabled: true,
- lineColor: 'rgb(100,100,100)'
- }
- }
- },
- states: {
- hover: {
- marker: {
- enabled: false
- }
- }
- },
- tooltip: {
- headerFormat: '<b>{series.name}</b><br>',
- pointFormat: '{point.x} cm, {point.y} kg'
- }
- }
- },
- series: [{
- regression: true,
- regressionSettings: {
- type: 'polynomial',
- color: 'rgba(223, 183, 83, .9)',
- dashStyle: 'dash'
- },
- name: 'Test input',
- color: 'rgba(223, 83, 83, .5)',
- data: [
- [1, 1],
- [2, 3],
- [3, 9],
- ]
- }]
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement