From b656f58958a5ca54e710b980b98f4b542ff6369f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 10 六月 2021 18:58:21 +0800
Subject: [PATCH] 2021-06-10

---
 src/menu/components/chart/antv-bar/chartcompile/index.jsx |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/chart/antv-bar/chartcompile/index.jsx b/src/menu/components/chart/antv-bar/chartcompile/index.jsx
index b46092e..0123d18 100644
--- a/src/menu/components/chart/antv-bar/chartcompile/index.jsx
+++ b/src/menu/components/chart/antv-bar/chartcompile/index.jsx
@@ -412,6 +412,13 @@
     this.setState({plot: {...plot, colors, ramp: val}, ramp: val})
   }
 
+  rampDirectionChange = (e) => {
+    const { plot } = this.state
+    let val = e.target.value
+
+    this.setState({plot: {...plot, rampDirection: val}})
+  }
+
   onSubmit = () => {
     const { config } = this.props
     const { plot, view } = this.state
@@ -597,7 +604,7 @@
             </TabPane>
             {plot ? <TabPane tab="棰滆壊璁剧疆" key="color">
               <div>
-                <Col span={12} style={{height: '40px', top: '-5px', zIndex: 1}}>
+                <Col span={8} style={{height: '40px', top: '-5px', zIndex: 1}}>
                   <Form {...formItemLayout}>
                     <Form.Item label="娓愬彉鑹�" style={{marginBottom: 10}}>
                       <Radio.Group value={plot.ramp || 'false'} onChange={this.rampChange}>
@@ -607,6 +614,16 @@
                     </Form.Item>
                   </Form>
                 </Col>
+                {plot.chartType === 'line' ? <Col span={8} style={{height: '40px', top: '-5px', zIndex: 1}}>
+                  <Form {...formItemLayout}>
+                    <Form.Item label="娓愬彉鏂瑰悜" style={{marginBottom: 10}}>
+                      <Radio.Group value={plot.rampDirection || 'horizontal'} onChange={this.rampDirectionChange}>
+                        <Radio value="horizontal">姘村钩</Radio>
+                        <Radio value="vertical">鍨傜洿</Radio>
+                      </Radio.Group>
+                    </Form.Item>
+                  </Form>
+                </Col> : null}
                 {datatype === 'statistics' ? <Button className="color-add mk-green" onClick={this.addColor}>{this.props.dict['model.add']}</Button> : null}
                 {datatype === 'statistics' ? <EditTable actions={['edit', 'move', 'del']} data={plot.colors || []} columns={ramp ==='true' ? rampStatColorColumns : statColorColumns} onChange={this.changeColor}/> : null}
                 {datatype !== 'statistics' ? <EditTable actions={['edit']} data={plot.colors || []} columns={ramp ==='true' ? rampColorColumns : colorColumns} onChange={this.changeColor}/> : null}

--
Gitblit v1.8.0