📜  D3.js threshold.domain()函数

📅  最后修改于: 2022-05-13 01:56:22.304000             🧑  作者: Mango

D3.js threshold.domain()函数

threshold.domain()函数用于设置阈值尺度的域。这里给出的值必须是非降序的,如果不是,则标度的行为是未定义的。

句法:

threshold.domain([domain]);

参数:此函数接受上面给出和下面描述的单个参数。

  • domain:此参数接受按排序顺序排列的元素数组,该数组设置比例的域。

返回值:此函数不返回任何值。

下面的程序说明了D3.js中的threshold.domain()函数

示例 1:

HTML


  

    
    
  
    

  

    

GeeksforGeeks

       

threshold.domain() Function

          


HTML


  

    
    
  
    

  

    

GeeksforGeeks

       

threshold.domain() Function

          


输出:

示例 2:

HTML



  

    
    
  
    

  

    

GeeksforGeeks

       

threshold.domain() Function

          

输出: