elementGenerator() {
    
    const svg =  this.getGraph()

    //Add the X Axis
    svg.insert('g',':first-child')
      .attr('class', 'xAxis')

    //Add the Y Axis
    svg.insert('g',':first-child')
      .attr('class', 'yAxis')

    this.getMinGraph()
        .append("g")
        .attr("class", "brush")

    svg.append("defs").append("clipPath")
      .attr("id", `clip${this.getGraphId()}`)
      .append('rect')

    svg.select('.horizontal-line').append("line")
      .style("stroke", "black")
      .style("stroke-width", "0.4")

    this.getMinGraph().select('.min-horizontal-line').append("line")
      .style("stroke", "black")
      .style("stroke-width", "0.4")

    // generate elements for X and Y titles
   this.generateAxisTitleElement()

  }
// generate methods which helps to create charts
generate methods which helps to create charts
generate methods which helps to create charts
elementGenerator() {
    const svg =  this.getGraph()
    svg.insert('g',':first-child')
      .attr('class', 'xAxis')
    svg.insert('g',':first-child')
      .attr('class', 'yAxis')
    this.getMinGraph()
        .append("g")
        .attr("class", "brush")
    svg.append("defs").append("clipPath")
      .attr("id", `clip${this.getGraphId()}`)
      .append('rect')
    svg.select('.horizontal-line').append("line")
      .style("stroke", "black")
      .style("stroke-width", "0.4")
    this.getMinGraph().select('.min-horizontal-line').append("line")
      .style("stroke", "black")
      .style("stroke-width", "0.4")
   this.generateAxisTitleElement()
  }
elementGenerator ( ) { const svg = this . getGraph ( ) svg . insert ( 'g' , ':first-child' ) . attr ( 'class' , 'xAxis' ) svg . insert ( 'g' , ':first-child' ) . attr ( 'class' , 'yAxis' ) this . getMinGraph ( ) . append ( "g" ) . attr ( "class" , "brush" ) svg . append ( "defs" ) . append ( "clipPath" ) . attr ( "id" , ` ${ this . getGraphId ( ) } ` ) . append ( 'rect' ) svg . select ( '.horizontal-line' ) . append ( "line" ) . style ( "stroke" , "black" ) . style ( "stroke-width" , "0.4" ) this . getMinGraph ( ) . select ( '.min-horizontal-line' ) . append ( "line" ) . style ( "stroke" , "black" ) . style ( "stroke-width" , "0.4" ) this . generateAxisTitleElement ( ) }
generate methods which helps to create charts
generate methods which helps to create charts
//Add the X Axis //Add the Y Axis // generate elements for X and Y titles