jmchart 1.1.78 → 1.1.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jmchart.amd.js +360 -357
- package/dist/jmchart.cjs.js +359 -356
- package/dist/jmchart.esm.js +360 -356
- package/dist/jmchart.iife.js +359 -358
- package/dist/jmchart.system.js +359 -356
- package/example/bar.html +2 -1
- package/package.json +1 -1
- package/src/series/barSeries.js +9 -2
package/example/bar.html
CHANGED
package/package.json
CHANGED
package/src/series/barSeries.js
CHANGED
|
@@ -107,8 +107,15 @@ export default class jmBarSeries extends jmSeries {
|
|
|
107
107
|
//计算每个柱子占宽
|
|
108
108
|
//每项柱子占宽除以柱子个数,默认最大宽度为30
|
|
109
109
|
const maxWidth = this.xAxis.width / count / this.graph.barSeriesCount;
|
|
110
|
-
|
|
111
|
-
this.barWidth
|
|
110
|
+
|
|
111
|
+
if(this.style.barWidth > 0) {
|
|
112
|
+
this.barWidth = Number(this.style.barWidth);
|
|
113
|
+
this.barTotalWidth = this.barWidth * this.graph.barSeriesCount;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
this.barTotalWidth = (this.xAxis.width / count * (this.style.perWidth||0.4));
|
|
117
|
+
this.barWidth = this.barTotalWidth / this.graph.barSeriesCount;
|
|
118
|
+
}
|
|
112
119
|
|
|
113
120
|
if(this.barWidth > maxWidth) {
|
|
114
121
|
this.barWidth = maxWidth;
|