text: /*=========================================================================================
      File Name: to-scatter-plot.js
      Description: c3 to scatter plot transform chart
      ----------------------------------------------------------------------------------------
      Item Name: Modern Admin - Clean Bootstrap 4 Admin HTML Template
      Version: 1.0
      Author: PIXINVENT
      Author URL: http://www.themeforest.net/user/pixinvent
  ==========================================================================================*/
  
  // To Scatter Plot Transform chart
  // ------------------------------
  $(window).on("load", function(){
  
      // Callback that creates and populates a data table, instantiates the to scatter plot transform chart, passes in the data and draws it.
      var toScatterTransfrom = c3.generate({
          bindto: "#to-scatter",
          size: {height:400},
          color: {
              pattern: ['#673AB7', '#E91E63']
          },
  
          // Create the data table.
          data: {
              xs: {
                  setosa: 'setosa_x',
                  versicolor: 'versicolor_x',
              },
              // iris data from R
              columns: [
                  ["setosa_x", 3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1, 3.7, 3.4, 3.0, 3.0, 4.0, 4.4, 3.9, 3.5, 3.8, 3.8, 3.4, 3.7, 3.6, 3.3, 3.4, 3.0, 3.4, 3.5, 3.4, 3.2, 3.1, 3.4, 4.1, 4.2, 3.1, 3.2, 3.5, 3.6, 3.0, 3.4, 3.5, 2.3, 3.2, 3.5, 3.8, 3.0, 3.8, 3.2, 3.7, 3.3],
                  ["versicolor_x", 3.2, 3.2, 3.1, 2.3, 2.8, 2.8, 3.3, 2.4, 2.9, 2.7, 2.0, 3.0, 2.2, 2.9, 2.9, 3.1, 3.0, 2.7, 2.2, 2.5, 3.2, 2.8, 2.5, 2.8, 2.9, 3.0, 2.8, 3.0, 2.9, 2.6, 2.4, 2.4, 2.7, 2.7, 3.0, 3.4, 3.1, 2.3, 3.0, 2.5, 2.6, 3.0, 2.6, 2.3, 2.7, 3.0, 2.9, 2.9, 2.5, 2.8],
                  ["setosa", 0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2, 0.2, 0.1, 0.2, 0.2, 0.1, 0.1, 0.2, 0.4, 0.4, 0.3, 0.3, 0.3, 0.2, 0.4, 0.2, 0.5, 0.2, 0.2, 0.4, 0.2, 0.2, 0.2, 0.2, 0.4, 0.1, 0.2, 0.2, 0.2, 0.2, 0.1, 0.2, 0.2, 0.3, 0.3, 0.2, 0.6, 0.4, 0.3, 0.2, 0.2, 0.2, 0.2],
                  ["versicolor", 1.4, 1.5, 1.5, 1.3, 1.5, 1.3, 1.6, 1.0, 1.3, 1.4, 1.0, 1.5, 1.0, 1.4, 1.3, 1.4, 1.5, 1.0, 1.5, 1.1, 1.8, 1.3, 1.5, 1.2, 1.3, 1.4, 1.4, 1.7, 1.5, 1.0, 1.1, 1.0, 1.2, 1.6, 1.5, 1.6, 1.5, 1.3, 1.3, 1.3, 1.2, 1.4, 1.2, 1.0, 1.3, 1.2, 1.3, 1.3, 1.1, 1.3],
              ],
              type: 'pie'
          },
          axis: {
              x: {
                  label: 'Sepal.Width',
                  tick: {
                      fit: false
                  }
              },
              y: {
                  label: 'Petal.Width'
              }
          }
      });
  
      // Instantiate and draw our chart, passing in some options.
      setTimeout(function () {
          toScatterTransfrom.transform('scatter');
      }, 1000);
  
      setTimeout(function () {
          toScatterTransfrom.transform('pie');
      }, 2000);
  
      setTimeout(function () {
          toScatterTransfrom.transform('scatter');
      }, 3000);
  
      // Resize chart on sidebar width change
      $(".menu-toggle").on('click', function() {
          toScatterTransfrom.resize();
      });
  });
  