king
2022-11-21 f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89
src/menu/components/chart/antv-bar/index.jsx
@@ -9,7 +9,7 @@
import MKEmitter from '@/utils/events.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
import { resetStyle, getTables } from '@/utils/utils-custom.js'
import { resetStyle, getTables, getHeight } from '@/utils/utils-custom.js'
import Utils from '@/utils/utils.js'
import { chartColors } from '@/utils/option.js'
import './index.scss'
@@ -228,7 +228,7 @@
      const chart = new Chart({
        container: card.uuid + 'canvas',
        autoFit: true,
        height: this.wrap.offsetHeight - 25
        height: getHeight(plot.height)
      })
  
      chart.data(dv.rows)
@@ -554,7 +554,7 @@
    const chart = new Chart({
      container: card.uuid + 'canvas',
      autoFit: true,
      height: this.wrap.offsetHeight - 25,
      height: getHeight(plot.height)
    })
    // chart.axis(plot.Xaxis, { label: { style: { fill: color } }, tickLine: {style: { stroke: color }}, line: { style: { stroke: color } } })
@@ -948,7 +948,7 @@
      const chart = new Chart({
        container: card.uuid + 'canvas',
        autoFit: true,
        height: this.wrap.offsetHeight - 25
        height: getHeight(plot.height)
      })
      chart.data(dv.rows)
@@ -1331,7 +1331,7 @@
  changeStyle = () => {
    const { card } = this.state
    MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle)
    MKEmitter.emit('changeStyle', ['background', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle)
  }
  getStyle = (style) => {
@@ -1354,10 +1354,12 @@
  render() {
    const { card, appType } = this.state
    let _style = resetStyle(card.style)
    _style.height = 'auto'
    return (
      <div className="menu-line-chart-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}>
      <div className="menu-line-chart-edit-box" style={_style} onClick={this.clickComponent} id={card.uuid}>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="添加搜索" onClick={this.addSearch}/> : null}
@@ -1375,7 +1377,7 @@
          <ToolOutlined/>
        </Popover>
        <NormalHeader config={card} updateComponent={this.updateComponent}/>
        <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div>
        <div className="canvas" id={card.uuid + 'canvas'}></div>
        {appType !== 'mob' ? <ActionComponent
          config={card}
          updateaction={this.updateComponent}