You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/02/16 07:44:25 UTC
[GitHub] [echarts] SanLeen opened a new issue #16516: [Bug] candlestick barMaxWidth will not work when barWidth is set
SanLeen opened a new issue #16516:
URL: https://github.com/apache/echarts/issues/16516
### Version
5.3.0
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
1. Candlestick chart width `barMaxWidth`

2. set `barWidth: '80%'`, `barMaxWidth` not work

### Current Behavior
Candlestick chart `barMaxWidth` will not work when `barWidth` is set
### Expected Behavior
`barMaxWidth` and `barWidth` work fine at Candlestick chart.
### Environment
```markdown
- OS: Windows 10 Pro 21H2
- Browser: Microsoft Edge 98.0.1108.43
- Framework: Angular@11.2.4
```
### Any additional comments?
Echarts Editor Code
```typescript
const data0 = splitData([
['2013/5/16', 2221.34, 2251.81, 2210.77, 2252.87],
['2013/5/17', 2249.81, 2282.87, 2248.41, 2288.09],
['2013/5/20', 2286.33, 2299.99, 2281.9, 2309.39],
['2013/5/21', 2297.11, 2305.11, 2290.12, 2305.3],
['2013/5/22', 2303.75, 2302.4, 2292.43, 2314.18],
['2013/5/23', 2293.81, 2275.67, 2274.1, 2304.95],
['2013/5/24', 2281.45, 2288.53, 2270.25, 2292.59],
['2013/5/27', 2286.66, 2293.08, 2283.94, 2301.7],
['2013/5/28', 2293.4, 2321.32, 2281.47, 2322.1],
['2013/5/29', 2323.54, 2324.02, 2321.17, 2334.33],
['2013/5/30', 2316.25, 2317.75, 2310.49, 2325.72],
['2013/5/31', 2320.74, 2300.59, 2299.37, 2325.53],
['2013/6/3', 2300.21, 2299.25, 2294.11, 2313.43],
['2013/6/4', 2297.1, 2272.42, 2264.76, 2297.1],
['2013/6/5', 2270.71, 2270.93, 2260.87, 2276.86],
['2013/6/6', 2264.43, 2242.11, 2240.07, 2266.69],
['2013/6/7', 2242.26, 2210.9, 2205.07, 2250.63],
['2013/6/13', 2190.1, 2148.35, 2126.22, 2190.1]
]);
function splitData(rawData: (number | string)[][]) {
const categoryData = [];
const values = [];
for (var i = 0; i < rawData.length; i++) {
categoryData.push(rawData[i].splice(0, 1)[0]);
values.push(rawData[i]);
}
return { categoryData, values };
}
option = {
grid: { left: '10%', right: '10%', bottom: '15%' },
xAxis: {
type: 'category',
data: data0.categoryData,
min: 'dataMin',
max: 'dataMax'
},
yAxis: { scale: true },
dataZoom: [{ type: 'inside', start: 50, end: 100 }],
series: [
{
type: 'candlestick',
data: data0.values,
// barWidth: '80%', // ๐๐คจ
barMaxWidth: 34
}
]
};
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org