king
2021-05-25 610916b0e897c4953310bac7c0a9a37c7379ffc0
2021-05-25
18个文件已修改
166 ■■■■ 已修改文件
src/menu/components/chart/antv-bar/index.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-dashboard/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-dashboard/index.scss 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-scatter/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-scatter/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/group/groupcomponents/index.scss 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/tabcomponents/index.scss 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.scss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-dashboard/index.jsx 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-dashboard/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.scss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-scatter/index.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-scatter/index.scss 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx
@@ -152,7 +152,8 @@
        _element.innerHTML = ''
      }
      setTimeout(this.viewrender, 100)
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(this.viewrender, 100)
    }
  }
@@ -195,7 +196,7 @@
   */
  linerender = () => {
    const { card } = this.state
    let plot = {...card.plot, height: card.plot.height - 80} // 去除title所占空间
    let plot = {...card.plot, height: card.plot.height - 70} // 去除title所占空间
    let color = plot.color || 'rgba(0, 0, 0, 0.65)'
    let X_axis = plot.Xaxis || 'x'
    let Y_axis = plot.Yaxis || ['y']
@@ -249,7 +250,7 @@
      }
      chart.scale('value', {
        nice: true,
        range: [0, 0.93]
        range: [0, 0.9]
      })
  
      if (!plot.legend || plot.legend === 'hidden') {
@@ -351,7 +352,7 @@
   */
  customrender = (data) => {
    let card = fromJS(this.state.card).toJS()
    let plot = {...card.plot, height: card.plot.height - 80} // 去除title所占空间
    let plot = {...card.plot, height: card.plot.height - 70} // 去除title所占空间
    let color = plot.color || 'rgba(0, 0, 0, 0.65)'
    let fields = []
    let legends = []
@@ -476,7 +477,7 @@
      
      chart.scale(item.name, {
        nice: true,
        range: [0, 0.93]
        range: [0, 0.9]
      })
      if (item.chartType === 'bar') {
@@ -563,7 +564,7 @@
   */
  barrender = () => {
    const { card } = this.state
    let plot = {...card.plot, height: card.plot.height - 80}
    let plot = {...card.plot, height: card.plot.height - 70}
    let color = plot.color || 'rgba(0, 0, 0, 0.65)'
    let X_axis = plot.Xaxis || 'x'
    let Y_axis = plot.Yaxis || ['y']
@@ -613,7 +614,7 @@
  
      chart.scale('value', {
        nice: true,
        range: [0, 0.93]
        range: [0, 0.9]
      })
  
      if (!plot.legend || plot.legend === 'hidden') {
@@ -768,13 +769,15 @@
  updateComponent = (component) => {
    const card = fromJS(this.state.card).toJS()
    let refresh = false
    if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style))) {
      let _element = document.getElementById(card.uuid + 'canvas')
      if (_element) {
        _element.innerHTML = ''
      }
      refresh = true
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(() => {
        this.viewrender()
      }, 150)
    }
    component.width = component.plot.width
@@ -782,12 +785,6 @@
    
    this.setState({
      card: component
    }, () => {
      if (refresh) {
        setTimeout(() => {
          this.viewrender()
        }, 100)
      }
    })
    this.props.updateConfig(component)
  }
src/menu/components/chart/antv-bar/index.scss
@@ -8,9 +8,9 @@
  
  .canvas {
    margin: 0px;
    // padding: 20px 15px 15px;
    padding: 15px;
    padding: 15px 10px 10px;
    letter-spacing: 0px;
    min-height: calc(100% - 45px);
  }
  .chart-header {
src/menu/components/chart/antv-dashboard/index.jsx
@@ -162,7 +162,8 @@
        _element.innerHTML = ''
      }
      setTimeout(this.dashboardrender, 100)
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(this.dashboardrender, 100)
    }
  }
@@ -183,7 +184,7 @@
    const chart = new Chart({
      container: card.uuid + 'dashboard',
      autoFit: true,
      height: plot.height ? (plot.height - 80) : 320,
      height: plot.height ? (plot.height - 75) : 325,
      padding: [0, 0, 0, 0],
    })
    chart.data(data);
@@ -315,13 +316,16 @@
  updateComponent = (component) => {
    const card = fromJS(this.state.card).toJS()
    let refresh = false
    if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style))) {
      let _element = document.getElementById(card.uuid + 'dashboard')
      if (_element) {
        _element.innerHTML = ''
      }
      refresh = true
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(() => {
        this.dashboardrender()
      }, 150)
    }
    component.width = component.plot.width
@@ -329,12 +333,6 @@
    
    this.setState({
      card: component
    }, () => {
      if (refresh) {
        setTimeout(() => {
          this.dashboardrender()
        }, 100)
      }
    })
    this.props.updateConfig(component)
  }
src/menu/components/chart/antv-dashboard/index.scss
@@ -8,7 +8,9 @@
  
  .canvas {
    margin: 0px;
    padding: 15px;
    letter-spacing: 0px;
    min-height: calc(100% - 45px);
  }
  >.anticon-tool {
src/menu/components/chart/antv-pie/index.jsx
@@ -138,7 +138,8 @@
        _element.innerHTML = ''
      }
      setTimeout(this.pierender, 100)
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(this.pierender, 100)
    }
  }
@@ -184,7 +185,7 @@
    const chart = new Chart({
      container: card.uuid + 'canvas',
      autoFit: true,
      height: card.plot.height ? (card.plot.height - 80) : 320
      height: card.plot.height ? (card.plot.height - 75) : 325
    })
    if (plot.shape !== 'nightingale' && plot.show !== 'value') {
@@ -353,13 +354,16 @@
  updateComponent = (component) => {
    const card = fromJS(this.state.card).toJS()
    let refresh = false
    if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style))) {
      let _element = document.getElementById(card.uuid + 'canvas')
      if (_element) {
        _element.innerHTML = ''
      }
      refresh = true
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(() => {
        this.pierender()
      }, 150)
    }
    component.width = component.plot.width
@@ -367,12 +371,6 @@
    
    this.setState({
      card: component
    }, () => {
      if (refresh) {
        setTimeout(() => {
          this.pierender()
        }, 100)
      }
    })
    this.props.updateConfig(component)
  }
src/menu/components/chart/antv-pie/index.scss
@@ -10,6 +10,7 @@
    margin: 0px;
    padding: 15px;
    letter-spacing: 0px;
    min-height: calc(100% - 45px);
  }
  >.anticon-tool {
src/menu/components/chart/antv-scatter/index.jsx
@@ -139,7 +139,8 @@
        _element.innerHTML = ''
      }
      setTimeout(this.ponitrender, 100)
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(this.ponitrender, 100)
    }
  }
@@ -188,7 +189,7 @@
    const chart = new Chart({
      container: card.uuid + 'canvas',
      autoFit: true,
      height: plot.height - 80
      height: plot.height - 70
    })
    chart.data(data);
@@ -233,13 +234,16 @@
  updateComponent = (component) => {
    const card = fromJS(this.state.card).toJS()
    let refresh = false
    if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style))) {
      let _element = document.getElementById(card.uuid + 'canvas')
      if (_element) {
        _element.innerHTML = ''
      }
      refresh = true
      this.$timer && clearTimeout(this.$timer)
      this.$timer = setTimeout(() => {
        this.ponitrender()
      }, 150)
    }
    component.width = component.plot.width
@@ -247,12 +251,6 @@
    
    this.setState({
      card: component
    }, () => {
      if (refresh) {
        setTimeout(() => {
          this.ponitrender()
        }, 100)
      }
    })
    this.props.updateConfig(component)
  }
src/menu/components/chart/antv-scatter/index.scss
@@ -8,9 +8,9 @@
  
  .canvas {
    margin: 0px;
    // padding: 20px 15px 15px;
    padding: 15px;
    padding: 15px 10px 10px;
    letter-spacing: 0px;
    min-height: calc(100% - 45px);
  }
  .chart-header {
src/menu/components/group/groupcomponents/index.scss
@@ -1,9 +1,6 @@
.group-shell-inner {
  margin: -8px;
  margin: 0px;
  >.ant-col {
    padding: 8px;
  }
  .anticon {
    cursor: unset;
  }
src/menu/components/tabs/tabcomponents/index.scss
@@ -1,9 +1,6 @@
.tab-shell-inner {
  margin: -8px;
  margin: 0px;
  >.ant-col {
    padding: 8px;
  }
  .anticon {
    cursor: unset;
  }
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -95,13 +95,14 @@
      })
    }
    let height = config.plot.height || 400
    if (config.plot.title || config.search.length > 0) {
      _config.plot.height = _config.plot.height - 80
      _config.plot.height = height - 70
    } else {
      _config.plot.height = _config.plot.height - 30
      _config.plot.height = height - 25
    }
    _config.style.height = config.plot.height || 400
    _config.style.height = height
    let transfield = {}
    _config.columns.forEach(col => {
@@ -763,7 +764,7 @@
    const chart = new Chart({
      container: this.state.chartId,
      autoFit: true,
      height: plot.height || 400
      height: plot.height
    })
    chart.data(_data)
@@ -905,7 +906,7 @@
    const chart = new Chart({
      container: this.state.chartId,
      autoFit: true,
      height: plot.height || 400
      height: plot.height
    })
    let _data = dv.rows
@@ -1110,7 +1111,7 @@
    const chart = new Chart({
      container: this.state.chartId,
      autoFit: true,
      height: plot.height || 400
      height: plot.height
    })
    // dodge is not support linear attribute, please use category attribute! 时间格式
@@ -1129,7 +1130,7 @@
    chart.scale(_valfield, {
      nice: true,
      range: [0, 0.93]
      range: [0, 0.9]
    })
    // 坐标轴格式化
@@ -1164,8 +1165,10 @@
      })
    }
    let offset = {offsetY: 5}
    if (plot.transpose === 'true') {
      chart.coordinate().transpose()
      offset = {offsetY: 0, offsetX: -10}
    }
    if (plot.coordinate === 'polar') {
@@ -1215,7 +1218,8 @@
            content: value,
            style: {
              fill: plot.color
            }
            },
            ...offset
          }
        })
      }
@@ -1369,7 +1373,7 @@
              }
            })}
          </div>
          <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div>
          <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 25}} id={this.state.chartId}></div>
        </div>
        {empty ? <Empty description={false}/> : null}
      </div>
src/tabviews/custom/components/chart/antv-bar-line/index.scss
@@ -9,6 +9,7 @@
  .canvas-wrap {
    margin: 0 0px;
    position: relative;
    min-height: calc(100% - 45px);
    .chart-action {
      position: absolute;
      top: 0px;
@@ -22,7 +23,7 @@
  .canvas {
    margin: 0;
    padding: 20px 15px 15px;
    padding: 15px 10px 10px;
    letter-spacing: 0px;
  }
  .canvas.empty {
src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -86,7 +86,13 @@
      _sync = false
    }
    _config.style.height = config.plot.height || 400
    let height = config.plot.height || 400
    if (config.plot.title) {
      _config.plot.height = height - 75
    } else {
      _config.plot.height = height - 30
    }
    _config.style.height = height
    this.setState({
      config: _config,
@@ -311,7 +317,7 @@
    const chart = new Chart({
      container: chartId,
      autoFit: true,
      height: plot.height ? (plot.height - 80) : 320,
      height: plot.height,
      padding: [0, 0, 0, 0],
    })
    chart.data([_data]);
@@ -457,7 +463,7 @@
        }
        <NormalHeader config={config} />
        <div className="canvas-wrap">
          <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div>
          <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 30}} id={this.state.chartId}></div>
        </div>
      </div>
    )
src/tabviews/custom/components/chart/antv-dashboard/index.scss
@@ -9,6 +9,7 @@
  .canvas-wrap {
    margin: 0 0px;
    position: relative;
    min-height: calc(100% - 45px);
    .chart-action {
      position: absolute;
      top: 2px;
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -55,13 +55,14 @@
      _sync = false
    }
    let height = config.plot.height || 400
    if (config.plot.title || config.search.length > 0) {
      _config.plot.height = _config.plot.height - 80
      _config.plot.height = height - 75
    } else {
      _config.plot.height = _config.plot.height - 30
      _config.plot.height = height - 30
    }
    _config.style.height = config.plot.height || 400
    _config.style.height = height
    this.setState({
      config: _config,
@@ -387,7 +388,7 @@
    const chart = new Chart({
      container: chartId,
      autoFit: true,
      height: plot.height || 400
      height: plot.height
    })
    if (plot.shape !== 'nightingale' && plot.show !== 'value') {
@@ -642,7 +643,7 @@
        }
        <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} />
        <div className="canvas-wrap">
          <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div>
          <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 30}} id={this.state.chartId}></div>
        </div>
        {empty ? <Empty description={false}/> : null}
      </div>
src/tabviews/custom/components/chart/antv-pie/index.scss
@@ -9,6 +9,7 @@
  .canvas-wrap {
    margin: 0 0px;
    position: relative;
    min-height: calc(100% - 45px);
    .chart-action {
      position: absolute;
      top: 2px;
src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -52,13 +52,14 @@
      _sync = false
    }
    let height = config.plot.height || 400
    if (config.plot.title || config.search.length > 0) {
      _config.plot.height = _config.plot.height - 80
      _config.plot.height = height - 70
    } else {
      _config.plot.height = _config.plot.height - 30
      _config.plot.height = height - 25
    }
    _config.style.height = config.plot.height
    _config.style.height = height
    this.setState({
      config: _config,
@@ -324,7 +325,7 @@
  }
  /**
   * @description 折线图渲染
   * @description 散点图渲染
   */
  scatterrender = () => {
    const { plot, data, chartId } = this.state
@@ -416,7 +417,7 @@
              }
            })}
          </div>
          <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div>
          <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 25}} id={this.state.chartId}></div>
        </div>
        {empty ? <Empty description={false}/> : null}
      </div>
src/tabviews/custom/components/chart/antv-scatter/index.scss
@@ -9,6 +9,7 @@
  .canvas-wrap {
    margin: 0 0px;
    position: relative;
    min-height: calc(100% - 45px);
    .chart-action {
      position: absolute;
      top: 0px;
@@ -22,7 +23,7 @@
  .canvas {
    margin: 0;
    padding: 20px 15px 15px;
    padding: 15px 10px 10px;
    letter-spacing: 0px;
  }
  .canvas.empty {