Skip to content

Commit

Permalink
K线barWidth
Browse files Browse the repository at this point in the history
  • Loading branch information
kener committed Sep 24, 2013
1 parent 38fe5e8 commit 2295e5f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/chart/k.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,19 @@ define(function(require) {
var candleWidth;
var data;
var value;
var barMaxWidth;
for (var j = 0, k = locationMap.length; j < k; j++) {
seriesIndex = locationMap[j];
serie = series[seriesIndex];

xAxisIndex = serie.xAxisIndex || 0;
categoryAxis = component.xAxis.getAxis(xAxisIndex);
candleWidth = Math.floor(categoryAxis.getGap() / 2);
candleWidth = serie.barWidth
|| Math.floor(categoryAxis.getGap() / 2);
barMaxWidth = serie.barMaxWidth;
if (barMaxWidth && barMaxWidth < candleWidth) {
candleWidth = barMaxWidth;
}
yAxisIndex = serie.yAxisIndex || 0;
valueAxis = component.yAxis.getAxis(yAxisIndex);

Expand Down

0 comments on commit 2295e5f

Please sign in to comment.