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.
@@ -1,4 +1,4 @@
1
- System.register([], function (exports) {
1
+ System.register([], function (exports, module) {
2
2
  'use strict';
3
3
  return {
4
4
  execute: function () {
@@ -3968,7 +3968,7 @@ System.register([], function (exports) {
3968
3968
 
3969
3969
  //获取当前控件的绝对位置
3970
3970
  let bounds = this.parent && this.parent.absoluteBounds?this.parent.absoluteBounds:this.absoluteBounds;
3971
- this.testSize();
3971
+ let size = this.testSize();
3972
3972
  let location = this.location;
3973
3973
  let x = location.left + bounds.left;
3974
3974
  let y = location.top + bounds.top;
@@ -4412,7 +4412,7 @@ System.register([], function (exports) {
4412
4412
 
4413
4413
  this.eventEvents['mousedown'] = jmUtils.bindEvent(this.target,'mousedown',function(evt) {
4414
4414
  evt = evt || window.event;
4415
- container.raiseEvent('mousedown',evt);
4415
+ let r = container.raiseEvent('mousedown',evt);
4416
4416
  //if(r === false) {
4417
4417
  //if(evt.preventDefault) evt.preventDefault();
4418
4418
  //return false;
@@ -4423,7 +4423,7 @@ System.register([], function (exports) {
4423
4423
  evt = evt || window.event;
4424
4424
  let target = evt.target || evt.srcElement;
4425
4425
  if(target == canvas) {
4426
- container.raiseEvent('mousemove',evt);
4426
+ let r = container.raiseEvent('mousemove',evt);
4427
4427
  //if(r === false) {
4428
4428
  if(evt.preventDefault) evt.preventDefault();
4429
4429
  return false;
@@ -4585,7 +4585,7 @@ System.register([], function (exports) {
4585
4585
  * @param {object} option 参数:{width:宽,height:高}
4586
4586
  * @param {function} callback 初始化后的回调
4587
4587
  */
4588
- class jmGraph$1 extends jmControl {
4588
+ class jmGraph extends jmControl {
4589
4589
 
4590
4590
  constructor(canvas, option, callback) {
4591
4591
  if(typeof option == 'function') {
@@ -4763,7 +4763,7 @@ System.register([], function (exports) {
4763
4763
  * @return {jmGraph} jmGraph实例对象
4764
4764
  */
4765
4765
  static create(...args) {
4766
- return new jmGraph$1(...args);
4766
+ return new jmGraph(...args);
4767
4767
  }
4768
4768
 
4769
4769
  /**
@@ -5109,7 +5109,7 @@ System.register([], function (exports) {
5109
5109
  "resize": jmResize
5110
5110
  };
5111
5111
 
5112
- class jmGraph extends jmGraph$1 {
5112
+ class jmGraph$1 extends jmGraph {
5113
5113
  constructor(canvas, option, callback) {
5114
5114
 
5115
5115
  const targetType = new.target;
@@ -5119,9 +5119,9 @@ System.register([], function (exports) {
5119
5119
  option.shapes = Object.assign(shapes, option.shapes||{});
5120
5120
 
5121
5121
  //不是用new实例化的话,返回一个promise
5122
- if(!targetType || !(targetType.prototype instanceof jmGraph$1)) {
5122
+ if(!targetType || !(targetType.prototype instanceof jmGraph)) {
5123
5123
  return new Promise(function(resolve, reject){
5124
- var g = new jmGraph(canvas, option, callback);
5124
+ var g = new jmGraph$1(canvas, option, callback);
5125
5125
  if(resolve) resolve(g);
5126
5126
  });
5127
5127
  }
@@ -5135,12 +5135,12 @@ System.register([], function (exports) {
5135
5135
  }
5136
5136
  }
5137
5137
 
5138
- /**
5139
- * 基础样式
5140
- *
5141
- * @class jmChartStyle
5142
- * @module jmChart
5143
- * @static
5138
+ /**
5139
+ * 基础样式
5140
+ *
5141
+ * @class jmChartStyle
5142
+ * @module jmChart
5143
+ * @static
5144
5144
  */
5145
5145
  var defaultStyle = {
5146
5146
  layout: 'normal',
@@ -5276,13 +5276,13 @@ System.register([], function (exports) {
5276
5276
  // 图形样式集
5277
5277
  chartColors: ['#249FDA', '#EA3B7C', '#8EBC00', '#309B46', '#4B507E', '#D8E404', '#EB792A', '#A00DA0'],
5278
5278
 
5279
- /*tooltip: {
5280
- 'background-color': 'rgb(255,255,255)',
5281
- 'padding':'4px',
5282
- 'opacity':'0.8',
5283
- 'border':'1px solid #000',
5284
- 'box-shadow': '0 0 3px #000',
5285
- 'border-radius': '6px'
5279
+ /*tooltip: {
5280
+ 'background-color': 'rgb(255,255,255)',
5281
+ 'padding':'4px',
5282
+ 'opacity':'0.8',
5283
+ 'border':'1px solid #000',
5284
+ 'box-shadow': '0 0 3px #000',
5285
+ 'border-radius': '6px'
5286
5286
  },*/
5287
5287
  line: {
5288
5288
  normal: {
@@ -5392,15 +5392,15 @@ System.register([], function (exports) {
5392
5392
  }
5393
5393
  };
5394
5394
 
5395
- /**
5396
- * 轴
5397
- *
5398
- * @class jmAxis
5399
- * @module jmChart
5400
- * @param {jmChart} chart 当前图表
5401
- * @param {string} [type] 轴类型(x/y/radar),默认为x
5402
- * @param {string} [dataType] 当前轴的数据类型(number/date/string),默认为 number
5403
- * @param {object} [style] 样式
5395
+ /**
5396
+ * 轴
5397
+ *
5398
+ * @class jmAxis
5399
+ * @module jmChart
5400
+ * @param {jmChart} chart 当前图表
5401
+ * @param {string} [type] 轴类型(x/y/radar),默认为x
5402
+ * @param {string} [dataType] 当前轴的数据类型(number/date/string),默认为 number
5403
+ * @param {object} [style] 样式
5404
5404
  */
5405
5405
 
5406
5406
  class jmAxis extends jmArrowLine {
@@ -5452,16 +5452,16 @@ System.register([], function (exports) {
5452
5452
  if (typeof options.minYValue !== 'undefined') this.minValue = options.minYValue; // 最小值,如果指定了,则轴的最小值为它或更小的值
5453
5453
  }
5454
5454
  }
5455
- /**
5456
- * 轴类型(x/y/radar),默认为x
5457
- *
5458
- * @property type
5459
- * @type string
5455
+ /**
5456
+ * 轴类型(x/y/radar),默认为x
5457
+ *
5458
+ * @property type
5459
+ * @type string
5460
5460
  */
5461
5461
 
5462
5462
 
5463
- /**
5464
- * 关联访问的是chart的数据源
5463
+ /**
5464
+ * 关联访问的是chart的数据源
5465
5465
  */
5466
5466
  get data() {
5467
5467
  return this.graph.data;
@@ -5470,10 +5470,10 @@ System.register([], function (exports) {
5470
5470
  set data(d) {
5471
5471
  this.graph.data = d;
5472
5472
  }
5473
- /**
5474
- * 计算当前轴的位置
5475
- *
5476
- * @method reset
5473
+ /**
5474
+ * 计算当前轴的位置
5475
+ *
5476
+ * @method reset
5477
5477
  */
5478
5478
 
5479
5479
 
@@ -5531,10 +5531,10 @@ System.register([], function (exports) {
5531
5531
 
5532
5532
  super.draw();
5533
5533
  }
5534
- /**
5535
- * 生成轴标签
5536
- *
5537
- * @method createLabel
5534
+ /**
5535
+ * 生成轴标签
5536
+ *
5537
+ * @method createLabel
5538
5538
  */
5539
5539
 
5540
5540
 
@@ -5551,11 +5551,11 @@ System.register([], function (exports) {
5551
5551
  this.createYLabel();
5552
5552
  }
5553
5553
  }
5554
- /**
5555
- * 生成X轴标签
5556
- *
5557
- * @method createXLabel
5558
- * @private
5554
+ /**
5555
+ * 生成X轴标签
5556
+ *
5557
+ * @method createXLabel
5558
+ * @private
5559
5559
  */
5560
5560
 
5561
5561
 
@@ -5646,11 +5646,11 @@ System.register([], function (exports) {
5646
5646
  }
5647
5647
  }
5648
5648
  }
5649
- /**
5650
- * 生成Y轴标签
5651
- *
5652
- * @method createYLabel
5653
- * @private
5649
+ /**
5650
+ * 生成Y轴标签
5651
+ *
5652
+ * @method createYLabel
5653
+ * @private
5654
5654
  */
5655
5655
 
5656
5656
 
@@ -5663,8 +5663,8 @@ System.register([], function (exports) {
5663
5663
 
5664
5664
  let count = this.labelCount;
5665
5665
  const mm = max - min;
5666
- /*if(mm <= 10) {
5667
- count = mm;
5666
+ /*if(mm <= 10) {
5667
+ count = mm;
5668
5668
  }*/
5669
5669
  // mm 放大10000倍,这里结果也需要除于10000
5670
5670
 
@@ -5776,10 +5776,10 @@ System.register([], function (exports) {
5776
5776
  }
5777
5777
  }
5778
5778
  }
5779
- /**
5780
- * 获取当前轴所占宽
5781
- *
5782
- * @method width
5779
+ /**
5780
+ * 获取当前轴所占宽
5781
+ *
5782
+ * @method width
5783
5783
  */
5784
5784
 
5785
5785
 
@@ -5794,10 +5794,10 @@ System.register([], function (exports) {
5794
5794
  set width(w) {
5795
5795
  this._width = w;
5796
5796
  }
5797
- /**
5798
- * 获取当前轴所占高
5799
- *
5800
- * @method height
5797
+ /**
5798
+ * 获取当前轴所占高
5799
+ *
5800
+ * @method height
5801
5801
  */
5802
5802
 
5803
5803
 
@@ -5807,12 +5807,12 @@ System.register([], function (exports) {
5807
5807
 
5808
5808
 
5809
5809
  set height(h) {}
5810
- /**
5811
- * 获取或设置当前轴最大值
5812
- *
5813
- * @method max
5814
- * @param {number/date/string} 当前轴的最大值
5815
- * @return 当前轴的最大值
5810
+ /**
5811
+ * 获取或设置当前轴最大值
5812
+ *
5813
+ * @method max
5814
+ * @param {number/date/string} 当前轴的最大值
5815
+ * @return 当前轴的最大值
5816
5816
  */
5817
5817
 
5818
5818
 
@@ -5861,12 +5861,12 @@ System.register([], function (exports) {
5861
5861
 
5862
5862
  return this._max;
5863
5863
  }
5864
- /**
5865
- * 获取或设置当前轴最小值
5866
- *
5867
- * @method max
5868
- * @param {number/date/string} 当前轴的最小值
5869
- * @return 当前轴的最小值
5864
+ /**
5865
+ * 获取或设置当前轴最小值
5866
+ *
5867
+ * @method max
5868
+ * @param {number/date/string} 当前轴的最小值
5869
+ * @return 当前轴的最小值
5870
5870
  */
5871
5871
 
5872
5872
 
@@ -5913,10 +5913,10 @@ System.register([], function (exports) {
5913
5913
 
5914
5914
  return this.dataType == 'string' ? 0 : this._min;
5915
5915
  }
5916
- /**
5917
- * 清除一些属性
5918
- *
5919
- * @method clear
5916
+ /**
5917
+ * 清除一些属性
5918
+ *
5919
+ * @method clear
5920
5920
  */
5921
5921
 
5922
5922
 
@@ -5924,11 +5924,11 @@ System.register([], function (exports) {
5924
5924
  this._min = null;
5925
5925
  this._max = null;
5926
5926
  }
5927
- /**
5928
- * 计算当前轴的单位偏移量
5929
- *
5930
- * @method step
5931
- * @return {number} 单位偏移量
5927
+ /**
5928
+ * 计算当前轴的单位偏移量
5929
+ *
5930
+ * @method step
5931
+ * @return {number} 单位偏移量
5932
5932
  */
5933
5933
 
5934
5934
 
@@ -5977,12 +5977,12 @@ System.register([], function (exports) {
5977
5977
 
5978
5978
  }
5979
5979
 
5980
- /**
5981
- * 图例的容器
5982
- *
5983
- * @class jmLegend
5984
- * @module jmChart
5985
- * @param {jmChart} chart 当前图表
5980
+ /**
5981
+ * 图例的容器
5982
+ *
5983
+ * @class jmLegend
5984
+ * @module jmChart
5985
+ * @param {jmChart} chart 当前图表
5986
5986
  */
5987
5987
 
5988
5988
  class jmLegend extends jmRect {
@@ -5996,18 +5996,18 @@ System.register([], function (exports) {
5996
5996
 
5997
5997
  _defineProperty(this, "legendPosition", 'right');
5998
5998
  }
5999
- /**
6000
- * 图例放置位置
5999
+ /**
6000
+ * 图例放置位置
6001
6001
  */
6002
6002
 
6003
6003
 
6004
6004
  }
6005
- /**
6006
- * 添加图例
6007
- *
6008
- * @method append
6009
- * @param {jmSeries} series 当前图序列
6010
- * @param {jmControl} shape 当前图例的图形对象
6005
+ /**
6006
+ * 添加图例
6007
+ *
6008
+ * @method append
6009
+ * @param {jmSeries} series 当前图序列
6010
+ * @param {jmControl} shape 当前图例的图形对象
6011
6011
  */
6012
6012
 
6013
6013
  jmLegend.prototype.append = function (series, shape, options = {}) {
@@ -6047,24 +6047,21 @@ System.register([], function (exports) {
6047
6047
  panel.height = shape.height; //执行进入事件
6048
6048
  //触动图例后加粗显示图
6049
6049
 
6050
- /*const hover = options.hover || function() {
6051
- //应用图的动态样式
6052
- //Object.assign(series.style, series.style.hover);
6053
-
6054
- //Object.assign(this.style, this.style.hover || {});
6055
-
6056
- //series.graph.refresh();
6057
- };
6058
- panel.bind('mouseover', hover);
6059
- //执行离开
6060
- const leave = options.leave || function() {
6061
- //应用图的普通样式
6062
- //Object.assign(series.style, series.style.normal);
6063
-
6064
- //Object.assign(this.style, this.style.normal || {});
6065
- //jmUtils.apply(this.series.style.normal,this.series.style);
6066
- //series.graph.refresh();
6067
- };
6050
+ /*const hover = options.hover || function() {
6051
+ //应用图的动态样式
6052
+ //Object.assign(series.style, series.style.hover);
6053
+ //Object.assign(this.style, this.style.hover || {});
6054
+ //series.graph.refresh();
6055
+ };
6056
+ panel.bind('mouseover', hover);
6057
+ //执行离开
6058
+ const leave = options.leave || function() {
6059
+ //应用图的普通样式
6060
+ //Object.assign(series.style, series.style.normal);
6061
+ //Object.assign(this.style, this.style.normal || {});
6062
+ //jmUtils.apply(this.series.style.normal,this.series.style);
6063
+ //series.graph.refresh();
6064
+ };
6068
6065
  panel.bind('mouseleave', leave);*/
6069
6066
 
6070
6067
  const legendPosition = this.legendPosition || this.style.legendPosition;
@@ -6084,10 +6081,10 @@ System.register([], function (exports) {
6084
6081
 
6085
6082
  this.needUpdate = true;
6086
6083
  };
6087
- /**
6088
- * 初始化图例
6089
- *
6090
- * @method init
6084
+ /**
6085
+ * 初始化图例
6086
+ *
6087
+ * @method init
6091
6088
  */
6092
6089
 
6093
6090
 
@@ -6099,10 +6096,10 @@ System.register([], function (exports) {
6099
6096
  this.style.lineWidth = 0;
6100
6097
  this.children.clear();
6101
6098
  };
6102
- /**
6103
- * 重置图例属性,根据图例内容计算期大小并更新画图区域大小
6104
- *
6105
- * @method reset
6099
+ /**
6100
+ * 重置图例属性,根据图例内容计算期大小并更新画图区域大小
6101
+ *
6102
+ * @method reset
6106
6103
  */
6107
6104
 
6108
6105
 
@@ -6147,11 +6144,11 @@ System.register([], function (exports) {
6147
6144
  };
6148
6145
 
6149
6146
  var utils = {
6150
- /**
6151
- * 对比二个数组数据是否改变
6152
- * @param {Array} source 被对比的数、组
6153
- * @param {Array} target 对比数组
6154
- * @param {Function} compare 比较函数
6147
+ /**
6148
+ * 对比二个数组数据是否改变
6149
+ * @param {Array} source 被对比的数、组
6150
+ * @param {Array} target 对比数组
6151
+ * @param {Function} compare 比较函数
6155
6152
  */
6156
6153
  arrayIsChange(source, target, compare) {
6157
6154
  if (!source || !target) return true;
@@ -6168,14 +6165,14 @@ System.register([], function (exports) {
6168
6165
 
6169
6166
  };
6170
6167
 
6171
- /**
6172
- * 图形基类
6173
- *
6174
- * @class jmSeries
6175
- * @module jmChart
6176
- * @param {jmChart} chart 当前图表
6177
- * @param {array} mappings 图形字段映射
6178
- * @param {style} style 样式
6168
+ /**
6169
+ * 图形基类
6170
+ *
6171
+ * @class jmSeries
6172
+ * @module jmChart
6173
+ * @param {jmChart} chart 当前图表
6174
+ * @param {array} mappings 图形字段映射
6175
+ * @param {style} style 样式
6179
6176
  */
6180
6177
  //构造线图
6181
6178
 
@@ -6219,8 +6216,8 @@ System.register([], function (exports) {
6219
6216
  maxYValue: options.maxYValue
6220
6217
  });
6221
6218
  }
6222
- /**
6223
- * 关联访问的是chart的数据源
6219
+ /**
6220
+ * 关联访问的是chart的数据源
6224
6221
  */
6225
6222
 
6226
6223
 
@@ -6242,11 +6239,11 @@ System.register([], function (exports) {
6242
6239
  set enableAnimate(v) {
6243
6240
  this.option.enableAnimate = v;
6244
6241
  }
6245
- /**
6246
- * 图例名称
6247
- *
6248
- * @property legendLabel
6249
- * @type string
6242
+ /**
6243
+ * 图例名称
6244
+ *
6245
+ * @property legendLabel
6246
+ * @type string
6250
6247
  */
6251
6248
 
6252
6249
 
@@ -6276,10 +6273,10 @@ System.register([], function (exports) {
6276
6273
  points: this.dataPoints
6277
6274
  };
6278
6275
  }
6279
- /**
6280
- * 根据X轴坐标,获取它最近的数据描点
6281
- * 离点最近的一个描点
6282
- * @param {number} x X轴坐标
6276
+ /**
6277
+ * 根据X轴坐标,获取它最近的数据描点
6278
+ * 离点最近的一个描点
6279
+ * @param {number} x X轴坐标
6283
6280
  */
6284
6281
 
6285
6282
 
@@ -6299,7 +6296,7 @@ System.register([], function (exports) {
6299
6296
  } // 下一个点
6300
6297
 
6301
6298
 
6302
- if (p.x > x) {
6299
+ if ( p.x > x) {
6303
6300
  // 没有上一个,只能返回这个了
6304
6301
  if (prePoint && x - prePoint.x < p.x - x) return prePoint;else return p;
6305
6302
  }
@@ -6307,9 +6304,9 @@ System.register([], function (exports) {
6307
6304
 
6308
6305
  return null;
6309
6306
  }
6310
- /**
6311
- * 根据X轴值获取数据点
6312
- * @param {number} xValue X轴值
6307
+ /**
6308
+ * 根据X轴值获取数据点
6309
+ * @param {number} xValue X轴值
6313
6310
  */
6314
6311
 
6315
6312
 
@@ -6323,11 +6320,11 @@ System.register([], function (exports) {
6323
6320
 
6324
6321
  return null;
6325
6322
  }
6326
- /**
6327
- * 重置属性
6328
- * 根据数据源计算轴的属性
6329
- *
6330
- * @method reset
6323
+ /**
6324
+ * 重置属性
6325
+ * 根据数据源计算轴的属性
6326
+ *
6327
+ * @method reset
6331
6328
  */
6332
6329
 
6333
6330
 
@@ -6371,10 +6368,10 @@ System.register([], function (exports) {
6371
6368
  this.xAxis.min(xv);
6372
6369
  }
6373
6370
  }
6374
- /**
6375
- * 生成序列图描点
6376
- *
6377
- * @method createPoints
6371
+ /**
6372
+ * 生成序列图描点
6373
+ *
6374
+ * @method createPoints
6378
6375
  */
6379
6376
 
6380
6377
 
@@ -6451,10 +6448,10 @@ System.register([], function (exports) {
6451
6448
  return this.style.color;
6452
6449
  }
6453
6450
  }
6454
- /**
6455
- * 生成图例
6456
- *
6457
- * @method createLegend
6451
+ /**
6452
+ * 生成图例
6453
+ *
6454
+ * @method createLegend
6458
6455
  */
6459
6456
 
6460
6457
 
@@ -6506,9 +6503,9 @@ System.register([], function (exports) {
6506
6503
  });
6507
6504
  this.addShape(label);
6508
6505
  }
6509
- /**
6510
- * 在图上加下定制图形
6511
- * @param {jmShape} shape 图形
6506
+ /**
6507
+ * 在图上加下定制图形
6508
+ * @param {jmShape} shape 图形
6512
6509
  */
6513
6510
 
6514
6511
 
@@ -6517,13 +6514,13 @@ System.register([], function (exports) {
6517
6514
  this.shapes.add(shape);
6518
6515
  return shape;
6519
6516
  }
6520
- /**
6521
- * 获取指定事件的集合
6522
- * 比如mousedown,mouseup等
6523
- *
6524
- * @method getEvent
6525
- * @param {string} name 事件名称
6526
- * @return {list} 事件委托的集合
6517
+ /**
6518
+ * 获取指定事件的集合
6519
+ * 比如mousedown,mouseup等
6520
+ *
6521
+ * @method getEvent
6522
+ * @param {string} name 事件名称
6523
+ * @return {list} 事件委托的集合
6527
6524
  */
6528
6525
 
6529
6526
 
@@ -6547,14 +6544,14 @@ System.register([], function (exports) {
6547
6544
 
6548
6545
  }
6549
6546
 
6550
- /**
6551
- * 柱图
6552
- *
6553
- * @class jmBarSeries
6554
- * @module jmChart
6555
- * @param {jmChart} chart 当前图表
6556
- * @param {array} mappings 图形字段映射
6557
- * @param {style} style 样式
6547
+ /**
6548
+ * 柱图
6549
+ *
6550
+ * @class jmBarSeries
6551
+ * @module jmChart
6552
+ * @param {jmChart} chart 当前图表
6553
+ * @param {array} mappings 图形字段映射
6554
+ * @param {style} style 样式
6558
6555
  */
6559
6556
  //构造函数
6560
6557
 
@@ -6562,11 +6559,11 @@ System.register([], function (exports) {
6562
6559
  constructor(options) {
6563
6560
  super(options);
6564
6561
  }
6565
- /**
6566
- * 绘制当前图形
6567
- *
6568
- * @method beginDraw
6569
- * @for jmBarSeries
6562
+ /**
6563
+ * 绘制当前图形
6564
+ *
6565
+ * @method beginDraw
6566
+ * @for jmBarSeries
6570
6567
  */
6571
6568
 
6572
6569
 
@@ -6659,17 +6656,23 @@ System.register([], function (exports) {
6659
6656
  //计算每个柱子占宽
6660
6657
  //每项柱子占宽除以柱子个数,默认最大宽度为30
6661
6658
  const maxWidth = this.xAxis.width / count / this.graph.barSeriesCount;
6662
- this.barTotalWidth = this.xAxis.width / count * (this.style.perWidth || 0.4);
6663
- this.barWidth = this.barTotalWidth / this.graph.barSeriesCount;
6659
+
6660
+ if (this.style.barWidth > 0) {
6661
+ this.barWidth = Number(this.style.barWidth);
6662
+ this.barTotalWidth = this.barWidth * this.graph.barSeriesCount;
6663
+ } else {
6664
+ this.barTotalWidth = this.xAxis.width / count * (this.style.perWidth || 0.4);
6665
+ this.barWidth = this.barTotalWidth / this.graph.barSeriesCount;
6666
+ }
6664
6667
 
6665
6668
  if (this.barWidth > maxWidth) {
6666
6669
  this.barWidth = maxWidth;
6667
6670
  this.barTotalWidth = maxWidth * this.graph.barSeriesCount;
6668
6671
  }
6669
6672
  }
6670
- /**
6671
- * 在图上加下定制图形
6672
- * @param {jmShape} shape 图形
6673
+ /**
6674
+ * 在图上加下定制图形
6675
+ * @param {jmShape} shape 图形
6673
6676
  */
6674
6677
 
6675
6678
 
@@ -6681,14 +6684,14 @@ System.register([], function (exports) {
6681
6684
 
6682
6685
  }
6683
6686
 
6684
- /**
6685
- * 柱图
6686
- *
6687
- * @class jmBarSeries
6688
- * @module jmChart
6689
- * @param {jmChart} chart 当前图表
6690
- * @param {array} mappings 图形字段映射
6691
- * @param {style} style 样式
6687
+ /**
6688
+ * 柱图
6689
+ *
6690
+ * @class jmBarSeries
6691
+ * @module jmChart
6692
+ * @param {jmChart} chart 当前图表
6693
+ * @param {array} mappings 图形字段映射
6694
+ * @param {style} style 样式
6692
6695
  */
6693
6696
  //构造函数
6694
6697
 
@@ -6696,11 +6699,11 @@ System.register([], function (exports) {
6696
6699
  constructor(options) {
6697
6700
  super(options);
6698
6701
  }
6699
- /**
6700
- * 绘制当前图形
6701
- *
6702
- * @method beginDraw
6703
- * @for jmBarSeries
6702
+ /**
6703
+ * 绘制当前图形
6704
+ *
6705
+ * @method beginDraw
6706
+ * @for jmBarSeries
6704
6707
  */
6705
6708
 
6706
6709
 
@@ -6830,14 +6833,14 @@ System.register([], function (exports) {
6830
6833
 
6831
6834
  }
6832
6835
 
6833
- /**
6834
- * 饼图
6835
- *
6836
- * @class jmPieSeries
6837
- * @module jmChart
6838
- * @param {jmChart} chart 当前图表
6839
- * @param {array} mappings 图形字段映射
6840
- * @param {style} style 样式
6836
+ /**
6837
+ * 饼图
6838
+ *
6839
+ * @class jmPieSeries
6840
+ * @module jmChart
6841
+ * @param {jmChart} chart 当前图表
6842
+ * @param {array} mappings 图形字段映射
6843
+ * @param {style} style 样式
6841
6844
  */
6842
6845
  //构造函数
6843
6846
 
@@ -6921,10 +6924,10 @@ System.register([], function (exports) {
6921
6924
  set startAngle(v) {
6922
6925
  this.option.startAngle = v;
6923
6926
  }
6924
- /**
6925
- * 生成序列图描点
6926
- *
6927
- * @method createPoints
6927
+ /**
6928
+ * 生成序列图描点
6929
+ *
6930
+ * @method createPoints
6928
6931
  */
6929
6932
 
6930
6933
 
@@ -7014,8 +7017,8 @@ System.register([], function (exports) {
7014
7017
  maxRadius: p.maxRadius,
7015
7018
  minRadius: p.minRadius
7016
7019
  });
7017
- /**
7018
- * 因为jmgraph是按图形形状来计算所占区域和大小的, 这里我们把扇形占区域改为整个图圆。这样计算大小和渐变时才好闭合。
7020
+ /**
7021
+ * 因为jmgraph是按图形形状来计算所占区域和大小的, 这里我们把扇形占区域改为整个图圆。这样计算大小和渐变时才好闭合。
7019
7022
  */
7020
7023
 
7021
7024
  p.shape.getLocation = function () {
@@ -7124,10 +7127,10 @@ System.register([], function (exports) {
7124
7127
  }
7125
7128
 
7126
7129
  }
7127
- /**
7128
- * 生成图例
7129
- *
7130
- * @method createLegend
7130
+ /**
7131
+ * 生成图例
7132
+ *
7133
+ * @method createLegend
7131
7134
  */
7132
7135
 
7133
7136
  jmPieSeries.prototype.createLegend = function () {
@@ -7169,14 +7172,14 @@ System.register([], function (exports) {
7169
7172
  }
7170
7173
  };
7171
7174
 
7172
- /**
7173
- * 图形基类
7174
- *
7175
- * @class jmLineSeries
7176
- * @module jmChart
7177
- * @param {jmChart} chart 当前图表
7178
- * @param {array} mappings 图形字段映射
7179
- * @param {style} style 样式
7175
+ /**
7176
+ * 图形基类
7177
+ *
7178
+ * @class jmLineSeries
7179
+ * @module jmChart
7180
+ * @param {jmChart} chart 当前图表
7181
+ * @param {array} mappings 图形字段映射
7182
+ * @param {style} style 样式
7180
7183
  */
7181
7184
  //构造函数
7182
7185
 
@@ -7185,11 +7188,11 @@ System.register([], function (exports) {
7185
7188
  options.style = options.style || options.graph.style.line;
7186
7189
  super(options); //this.on('beginDraw', this[PreDrawKey]);
7187
7190
  }
7188
- /**
7189
- * 绘制图形前 初始化线条
7190
- *
7191
- * @method preDraw
7192
- * @for jmLineSeries
7191
+ /**
7192
+ * 绘制图形前 初始化线条
7193
+ *
7194
+ * @method preDraw
7195
+ * @for jmLineSeries
7193
7196
  */
7194
7197
 
7195
7198
 
@@ -7240,8 +7243,8 @@ System.register([], function (exports) {
7240
7243
  shapePoints = this.createCurePoints(shapePoints, p);
7241
7244
  } // 如果是虚线
7242
7245
  else if (this.style.lineType === 'dotted') {
7243
- shapePoints = this.createDotLine(shapePoints, p);
7244
- }
7246
+ shapePoints = this.createDotLine(shapePoints, p);
7247
+ }
7245
7248
 
7246
7249
  shapePoints.push(p);
7247
7250
  this.createItemLabel(p); // 生成关健值标注
@@ -7324,10 +7327,10 @@ System.register([], function (exports) {
7324
7327
 
7325
7328
  return shapePoints;
7326
7329
  }
7327
- /**
7328
- * 生成图例
7329
- *
7330
- * @method createLegend
7330
+ /**
7331
+ * 生成图例
7332
+ *
7333
+ * @method createLegend
7331
7334
  */
7332
7335
 
7333
7336
 
@@ -7416,14 +7419,14 @@ System.register([], function (exports) {
7416
7419
 
7417
7420
  }
7418
7421
 
7419
- /**
7420
- * 二条线组成的区域图表
7421
- *
7422
- * @class jmStackLineSeries
7423
- * @module jmChart
7424
- * @param {jmChart} chart 当前图表
7425
- * @param {array} mappings 图形字段映射
7426
- * @param {style} style 样式
7422
+ /**
7423
+ * 二条线组成的区域图表
7424
+ *
7425
+ * @class jmStackLineSeries
7426
+ * @module jmChart
7427
+ * @param {jmChart} chart 当前图表
7428
+ * @param {array} mappings 图形字段映射
7429
+ * @param {style} style 样式
7427
7430
  */
7428
7431
  //构造函数
7429
7432
 
@@ -7432,11 +7435,11 @@ System.register([], function (exports) {
7432
7435
  options.style = options.style || options.graph.style.stackLine;
7433
7436
  super(options);
7434
7437
  }
7435
- /**
7436
- * 绘制图形前 初始化线条
7437
- *
7438
- * @method preDraw
7439
- * @for jmLineSeries
7438
+ /**
7439
+ * 绘制图形前 初始化线条
7440
+ *
7441
+ * @method preDraw
7442
+ * @for jmLineSeries
7440
7443
  */
7441
7444
 
7442
7445
 
@@ -7486,9 +7489,9 @@ System.register([], function (exports) {
7486
7489
  endShapePoints = this.createCurePoints(endShapePoints, p.points[1]);
7487
7490
  } // 如果是虚线
7488
7491
  else if (this.style.lineType === 'dotted') {
7489
- startShapePoints = this.createDotLine(startShapePoints, p.points[0]);
7490
- endShapePoints = this.createDotLine(endShapePoints, p.points[1]);
7491
- }
7492
+ startShapePoints = this.createDotLine(startShapePoints, p.points[0]);
7493
+ endShapePoints = this.createDotLine(endShapePoints, p.points[1]);
7494
+ }
7492
7495
 
7493
7496
  startShapePoints.push(p.points[0]);
7494
7497
  endShapePoints.push(p.points[1]); // 生成标点的回调
@@ -7516,10 +7519,10 @@ System.register([], function (exports) {
7516
7519
  areaEnd.m = false;
7517
7520
  this.createArea(areaPoints, false);
7518
7521
  }
7519
- /**
7520
- * 生成图例
7521
- *
7522
- * @method createLegend
7522
+ /**
7523
+ * 生成图例
7524
+ *
7525
+ * @method createLegend
7523
7526
  */
7524
7527
 
7525
7528
 
@@ -7567,15 +7570,15 @@ System.register([], function (exports) {
7567
7570
 
7568
7571
  }
7569
7572
 
7570
- /**
7571
- * 轴
7572
- *
7573
- * @class jmAxis
7574
- * @module jmChart
7575
- * @param {jmChart} chart 当前图表
7576
- * @param {string} [type] 轴类型(x/y/radar),默认为x
7577
- * @param {string} [dataType] 当前轴的数据类型(number/date/string),默认为 number
7578
- * @param {object} [style] 样式
7573
+ /**
7574
+ * 轴
7575
+ *
7576
+ * @class jmAxis
7577
+ * @module jmChart
7578
+ * @param {jmChart} chart 当前图表
7579
+ * @param {string} [type] 轴类型(x/y/radar),默认为x
7580
+ * @param {string} [dataType] 当前轴的数据类型(number/date/string),默认为 number
7581
+ * @param {object} [style] 样式
7579
7582
  */
7580
7583
 
7581
7584
  class jmMarkLine extends jmLine {
@@ -7584,8 +7587,8 @@ System.register([], function (exports) {
7584
7587
  this.visible = false;
7585
7588
  this.markLineType = options.type || 'x'; // 为横轴x或纵轴y
7586
7589
 
7587
- /**
7588
- * 当前图形下的所有子图
7590
+ /**
7591
+ * 当前图形下的所有子图
7589
7592
  */
7590
7593
 
7591
7594
  this.shapes = new jmList();
@@ -7665,9 +7668,9 @@ System.register([], function (exports) {
7665
7668
  }, 10);
7666
7669
  }
7667
7670
  }
7668
- /**
7669
- * 移动标线
7670
- * @param { object } args 移动事件参数
7671
+ /**
7672
+ * 移动标线
7673
+ * @param { object } args 移动事件参数
7671
7674
  */
7672
7675
 
7673
7676
 
@@ -7731,8 +7734,8 @@ System.register([], function (exports) {
7731
7734
  this.needUpdate = true;
7732
7735
  }
7733
7736
  }
7734
- /**
7735
- * 中止
7737
+ /**
7738
+ * 中止
7736
7739
  */
7737
7740
 
7738
7741
 
@@ -7743,16 +7746,16 @@ System.register([], function (exports) {
7743
7746
 
7744
7747
  }
7745
7748
 
7746
- /**
7747
- * jm图表组件
7748
- * option参数:graph=jmgraph
7749
- *
7750
- * @class jmChart
7751
- * @module jmChart
7752
- * @param {element} container 图表容器
7749
+ /**
7750
+ * jm图表组件
7751
+ * option参数:graph=jmgraph
7752
+ *
7753
+ * @class jmChart
7754
+ * @module jmChart
7755
+ * @param {element} container 图表容器
7753
7756
  */
7754
7757
 
7755
- class jmChart extends jmGraph {
7758
+ class jmChart extends jmGraph$1 {
7756
7759
  constructor(container, options) {
7757
7760
  options = options || {};
7758
7761
  const enableAnimate = !!options.enableAnimate;
@@ -7778,13 +7781,13 @@ System.register([], function (exports) {
7778
7781
 
7779
7782
  this.createTouchGraph(this.container, options);
7780
7783
  }
7781
- /**
7782
- * 绑定的数据源
7784
+ /**
7785
+ * 绑定的数据源
7783
7786
  */
7784
7787
 
7785
7788
 
7786
- /**
7787
- * 是否启用动画
7789
+ /**
7790
+ * 是否启用动画
7788
7791
  */
7789
7792
  get enableAnimate() {
7790
7793
  if (typeof this.option.enableAnimate !== 'undefined') return !!this.option.enableAnimate;else {
@@ -7795,8 +7798,8 @@ System.register([], function (exports) {
7795
7798
  set enableAnimate(v) {
7796
7799
  this.option.enableAnimate = v;
7797
7800
  }
7798
- /**
7799
- * Y轴的基线 默认是0
7801
+ /**
7802
+ * Y轴的基线 默认是0
7800
7803
  */
7801
7804
 
7802
7805
 
@@ -7810,11 +7813,11 @@ System.register([], function (exports) {
7810
7813
 
7811
7814
 
7812
7815
  init(options) {
7813
- /**
7814
- * 绘图区域
7815
- *
7816
- * @property chartArea
7817
- * @type jmControl
7816
+ /**
7817
+ * 绘图区域
7818
+ *
7819
+ * @property chartArea
7820
+ * @type jmControl
7818
7821
  */
7819
7822
  if (!this.chartArea) {
7820
7823
  this.chartArea = this.createShape('rect', {
@@ -7826,11 +7829,11 @@ System.register([], function (exports) {
7826
7829
  });
7827
7830
  this.children.add(this.chartArea);
7828
7831
  }
7829
- /**
7830
- * 图例
7831
- *
7832
- * @property legend
7833
- * @type jmLegend
7832
+ /**
7833
+ * 图例
7834
+ *
7835
+ * @property legend
7836
+ * @type jmLegend
7834
7837
  */
7835
7838
 
7836
7839
 
@@ -7842,11 +7845,11 @@ System.register([], function (exports) {
7842
7845
  if (options.legendVisible === false) {
7843
7846
  this.legend.visible = false;
7844
7847
  }
7845
- /**
7846
- * 图表提示控件
7847
- *
7848
- * @property tooltip
7849
- * @type jmTooltip
7848
+ /**
7849
+ * 图表提示控件
7850
+ *
7851
+ * @property tooltip
7852
+ * @type jmTooltip
7850
7853
  */
7851
7854
  //this.tooltip = this.graph.createShape('tooltip',{style:this.style.tooltip});
7852
7855
  //this.chartArea.children.add(this.tooltip);
@@ -7875,7 +7878,7 @@ System.register([], function (exports) {
7875
7878
  cn.style.position = 'absolute';
7876
7879
  cn.style.top = 0;
7877
7880
  cn.style.left = 0;
7878
- this.touchGraph = graph = new jmGraph(cn, options);
7881
+ this.touchGraph = graph = new jmGraph$1(cn, options);
7879
7882
  container.appendChild(cn);
7880
7883
  this.touchGraph.chartGraph = this;
7881
7884
  this.on('propertyChange', (name, args) => {
@@ -7974,11 +7977,11 @@ System.register([], function (exports) {
7974
7977
  delete this.yAxises;
7975
7978
  }
7976
7979
  }
7977
- /**
7978
- * 获取颜色
7979
- *
7980
- * @method getColor
7981
- * @param {int} index 颜色索引
7980
+ /**
7981
+ * 获取颜色
7982
+ *
7983
+ * @method getColor
7984
+ * @param {int} index 颜色索引
7982
7985
  */
7983
7986
 
7984
7987
 
@@ -7990,11 +7993,11 @@ System.register([], function (exports) {
7990
7993
 
7991
7994
  return this.style.chartColors[index];
7992
7995
  }
7993
- /**
7994
- * 绘制当前图表
7995
- * 先绘制轴等基础信息
7996
- *
7997
- * @method beginDraw
7996
+ /**
7997
+ * 绘制当前图表
7998
+ * 先绘制轴等基础信息
7999
+ *
8000
+ * @method beginDraw
7998
8001
  */
7999
8002
 
8000
8003
 
@@ -8059,10 +8062,10 @@ System.register([], function (exports) {
8059
8062
  serie.init && serie.init();
8060
8063
  }); //console.log('beginDraw4', Date.now() - startTime);
8061
8064
  }
8062
- /**
8063
- * 重新定位区域的位置
8064
- *
8065
- * @method resetAreaPosition
8065
+ /**
8066
+ * 重新定位区域的位置
8067
+ *
8068
+ * @method resetAreaPosition
8066
8069
  */
8067
8070
 
8068
8071
 
@@ -8074,15 +8077,15 @@ System.register([], function (exports) {
8074
8077
  this.chartArea.width = w;
8075
8078
  this.chartArea.height = h;
8076
8079
  }
8077
- /**
8078
- * 创建轴
8079
- *
8080
- * @method createAxis
8081
- * @for jmChart
8082
- * @param {string} [type] 轴类型(x/y/radar),默认为x
8083
- * @param {string} [dataType] 当前轴的数据类型(number/date/string),默认为 number
8084
- * @param {object} [style] 样式
8085
- * @return {axis} 轴
8080
+ /**
8081
+ * 创建轴
8082
+ *
8083
+ * @method createAxis
8084
+ * @for jmChart
8085
+ * @param {string} [type] 轴类型(x/y/radar),默认为x
8086
+ * @param {string} [dataType] 当前轴的数据类型(number/date/string),默认为 number
8087
+ * @param {object} [style] 样式
8088
+ * @return {axis} 轴
8086
8089
  */
8087
8090
 
8088
8091
 
@@ -8094,12 +8097,12 @@ System.register([], function (exports) {
8094
8097
  this.children.add(axis);
8095
8098
  return axis;
8096
8099
  }
8097
- /**
8098
- * 生成X轴
8099
- *
8100
- * @method createXAxis
8101
- * @param {string} x轴的数据类型(string/number/date)
8102
- * @param {bool} 是否从0开始
8100
+ /**
8101
+ * 生成X轴
8102
+ *
8103
+ * @method createXAxis
8104
+ * @param {string} x轴的数据类型(string/number/date)
8105
+ * @param {bool} 是否从0开始
8103
8106
  */
8104
8107
 
8105
8108
 
@@ -8126,13 +8129,13 @@ System.register([], function (exports) {
8126
8129
 
8127
8130
  return this.xAxis;
8128
8131
  }
8129
- /**
8130
- * 生成Y轴
8131
- *
8132
- * @method createYAxis
8133
- * @param {int} Y轴索引,可以创建多个Y轴
8134
- * @param {string} y轴的数据类型(string/number/date)
8135
- * @param {bool} 是否从0开始
8132
+ /**
8133
+ * 生成Y轴
8134
+ *
8135
+ * @method createYAxis
8136
+ * @param {int} Y轴索引,可以创建多个Y轴
8137
+ * @param {string} y轴的数据类型(string/number/date)
8138
+ * @param {bool} 是否从0开始
8136
8139
  */
8137
8140
 
8138
8141
 
@@ -8161,14 +8164,14 @@ System.register([], function (exports) {
8161
8164
  var yaxis = this.yAxises[options.index] || (this.yAxises[options.index] = this.createAxis(options));
8162
8165
  return yaxis;
8163
8166
  }
8164
- /**
8165
- * 创建图形
8166
- *
8167
- * @method createSeries
8168
- * @for jmChart
8169
- * @param {string} [type] 图类型,(line/bar/pie/radar)
8170
- * @param {object} [options] 生成图表选项 {xField, yField, index}
8171
- * @return {series} 图形
8167
+ /**
8168
+ * 创建图形
8169
+ *
8170
+ * @method createSeries
8171
+ * @for jmChart
8172
+ * @param {string} [type] 图类型,(line/bar/pie/radar)
8173
+ * @param {object} [options] 生成图表选项 {xField, yField, index}
8174
+ * @return {series} 图形
8172
8175
  */
8173
8176
 
8174
8177