跳到主要内容
版本: 最新版本-3.5

bar(条形图)

Draw a bar graph like histogram to inspect the data distribution.(绘制类似直方图的条形图以检查数据分布。)

语法

bar(size, min, max, width) 

参数

  • size: size of the bar, must be within the [min, max]size:条形大小,必须在[min, max]范围内)
  • min: min value of the bar(min:条形的最小值)
  • max: max value of the bar(max:条形的最大值)
  • width: width of the bar(width:条形的宽度)

示例

MYSQL > select r, bar(r, 0, 10, 20) as x from table(generate_series(0, 10)) as s(r);

0
1 ▓▓
2 ▓▓▓▓
3 ▓▓▓▓▓▓
4 ▓▓▓▓▓▓▓▓
5 ▓▓▓▓▓▓▓▓▓▓
6 ▓▓▓▓▓▓▓▓▓▓▓▓
7 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓
8 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
9 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
10 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓