NonLinear-Fit Chart

In statistics, nonlinear regression is a form of regression analysis in which observational data are modeled by a function which is a nonlinear combination of the model parameters and depends on one or more independent variables. The data are fitted by a method of successive approximations.


Example Color Themes

Example Fonts



Show Code

Tools

<!-- Include the CanvasXpress library in your HTML file -->
<link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/>
<script src="https://www.canvasxpress.org/canvasXpress.min.js"></script>


<!-- Create a canvas element for the chart with the desired dimensions -->
<div>
  <canvas id="canvasId" width="600" height="600"</canvas>
</div>


<!-- Create a script to initialize the chart -->
<script>

  <!-- Create the data for the graph -->
  var data = {
     "y" : {
        "data" : [
          [4,390],
          [9,580],
          [10,650],
          [14,730],
          [4,410],
          [7,530],
          [12,600],
          [22,790],
          [1,350],
          [3,400],
          [8,590],
          [11,640],
          [5,450],
          [6,520],
          [10,690],
          [11,690],
          [16,770],
          [13,700],
          [13,730],
          [10,640]
        ],
        "smps" : ["Hours","Score"],
        "vars" : ["S1","S2","S3","S4","S5","S6","S7","S8","S9","S10","S11","S12","S13","S14","S15","S16","S17","S18","S19","S20"]
     }
  }
  
  
  <-- Create the configuration for the graph -->
  var config = {
     "decorations":{
        "linear":[
           {
              "color":"red"
           }
        ]
     },
     "graphType":"Scatter2D",
     "showDecorations":"true",
     "showLegend":"false",
     "theme":"CanvasXpress"
  }
  

  <!-- Call the CanvasXpress function to create the graph -->
  var cX = new CanvasXpress("canvasId", data, config);


</script>