| | |
| | | width: card.width || 24, |
| | | height: 400, |
| | | barSize: 35, |
| | | color: 'rgba(0, 0, 0, 0.65)', |
| | | name: card.name |
| | | } |
| | | |
| | |
| | | linerender = () => { |
| | | const { card } = this.state |
| | | let plot = {...card.plot, height: card.plot.height - 80} // 去除title所占空间 |
| | | let color = plot.color || 'rgba(0, 0, 0, 0.85)' |
| | | let color = plot.color || 'rgba(0, 0, 0, 0.65)' |
| | | let X_axis = plot.Xaxis || 'x' |
| | | let Y_axis = plot.Yaxis || ['y'] |
| | | |
| | |
| | | |
| | | chart.data(dv.rows) |
| | | |
| | | chart.axis(X_axis, { label: { style: { fill: color } }, line: { style: { fill: color } } }) |
| | | chart.axis('value', { grid: { style: { fill: color } }, label: { style: { fill: color } } }) |
| | | // chart.axis(X_axis, { label: { style: { fill: color } }, tickLine: {style: { stroke: color }}, line: { style: { stroke: color } } }) |
| | | // chart.axis('value', { grid: { line: { style: { stroke: color } }}, label: { style: { fill: color } } }) |
| | | chart.axis(X_axis, { label: { style: { fill: color } } }) |
| | | chart.axis('value', { label: { style: { fill: color } } }) |
| | | |
| | | if (plot.coordinate !== 'polar') { |
| | | chart.scale(X_axis, { |
| | |
| | | customrender = (data) => { |
| | | let card = fromJS(this.state.card).toJS() |
| | | let plot = {...card.plot, height: card.plot.height - 80} // 去除title所占空间 |
| | | let color = plot.color || 'rgba(0, 0, 0, 0.85)' |
| | | let color = plot.color || 'rgba(0, 0, 0, 0.65)' |
| | | let fields = [] |
| | | let legends = [] |
| | | let transfield = {} |
| | |
| | | |
| | | if (item.axis === 'true' && axisIndex < 2) { |
| | | if (axisIndex === 0) { |
| | | item.axis = { grid: {style: { fill: color }}, title: { style: { fill: color } }, label: {style: { fill: color }} } |
| | | // item.axis = { grid: {line: { style: { stroke: color } }}, title: { style: { fill: color } }, label: {style: { fill: color }} } |
| | | item.axis = { title: { style: { fill: color } }, label: {style: { fill: color }} } |
| | | fields.unshift(item) |
| | | } else { |
| | | item.axis = { grid: null, title: {style: { fill: color }}, label: {style: { fill: color }} } |
| | |
| | | |
| | | chart.data(dv.rows) |
| | | |
| | | chart.axis(plot.Xaxis, { label: { style: { fill: color } }, line: { style: { fill: color } } }) |
| | | // chart.axis(plot.Xaxis, { label: { style: { fill: color } }, tickLine: {style: { stroke: color }}, line: { style: { stroke: color } } }) |
| | | chart.axis(plot.Xaxis, { label: { style: { fill: color } } }) |
| | | |
| | | if (!hasBar) { |
| | | chart.scale(plot.Xaxis, { |
| | |
| | | barrender = () => { |
| | | const { card } = this.state |
| | | let plot = {...card.plot, height: card.plot.height - 80} |
| | | let color = plot.color || 'rgba(0, 0, 0, 0.85)' |
| | | let color = plot.color || 'rgba(0, 0, 0, 0.65)' |
| | | let X_axis = plot.Xaxis || 'x' |
| | | let Y_axis = plot.Yaxis || ['y'] |
| | | |
| | |
| | | |
| | | chart.data(dv.rows) |
| | | |
| | | chart.axis(X_axis, { label: { style: { fill: color } }, line: { style: { fill: color } } }) |
| | | chart.axis('value', { grid: { style: { fill: color } }, label: { style: { fill: color } } }) |
| | | // chart.axis(X_axis, { label: { style: { fill: color } }, tickLine: {style: { stroke: color }}, line: { style: { stroke: color } } }) |
| | | // chart.axis('value', { grid: { line: { style: { stroke: color } }}, label: { style: { fill: color } } }) |
| | | chart.axis(X_axis, { label: { style: { fill: color } } }) |
| | | chart.axis('value', { label: { style: { fill: color } } }) |
| | | |
| | | chart.scale('value', { |
| | | nice: true, |