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

<head>
  <!-- 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/dist/canvasXpress.min.js"></script>
</head>

<body>

  <!-- 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" : [
            [0,2],
            [1,4],
            [2,7],
            [3,7],
            [4,19],
            [5,20],
            [6,43],
            [7,51],
            [8,74],
            [9,81],
            [10,75],
            [11,117],
            [12,100],
            [13,84],
            [14,90],
            [15,54],
            [16,43],
            [17,47],
            [18,34],
            [19,24],
            [20,11],
            [21,7],
            [22,4],
            [23,2]
          ],
          "smps" : ["X","Y"],
          "vars" : ["S1","S2","S3","S4","S5","S6","S7","S8","S9","S10","S11","S12","S13","S14","S15","S16","S17","S18","S19","S20","S21","S22","S23","S24"]
       }
    }
    
    
    // Create the configuration for the graph
    var config = {
       "graphType":"Scatter2D",
       "showDecorations":true,
       "showLegend":false,
       "theme":"CanvasXpress",
       "xAxis":[
          "X"
       ],
       "yAxis":[
          "Y"
       ]
    }
    

    // Call the CanvasXpress function to create the graph
    var cX = new CanvasXpress("canvasId", data, config);


    
      // Functions after rendering graph
      cX.addNormalDistributionLine();
    
  </script>

</body>