@rfkit/charts 1.1.10 → 1.1.11

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.
Files changed (2) hide show
  1. package/index.js +7 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5814,6 +5814,7 @@ var type_GraphicType = /*#__PURE__*/ function(GraphicType1) {
5814
5814
  GraphicType1["Area"] = "area";
5815
5815
  return GraphicType1;
5816
5816
  }({});
5817
+ const ENABLE_AREA_GRADIENT = false;
5817
5818
  class Series extends engine_Engine {
5818
5819
  init(props) {
5819
5820
  super.init(props);
@@ -6033,10 +6034,12 @@ class Series extends engine_Engine {
6033
6034
  ctx.lineTo(endX, lastY);
6034
6035
  ctx.lineTo(endX, 0);
6035
6036
  ctx.closePath();
6036
- const gradient = ctx.createLinearGradient(0, 0, 0, height);
6037
- gradient.addColorStop(0, `rgba(${r}, ${g}, ${b}, 0)`);
6038
- gradient.addColorStop(1, `rgba(${r}, ${g}, ${b}, 0.5)`);
6039
- ctx.fillStyle = gradient;
6037
+ if (ENABLE_AREA_GRADIENT) {
6038
+ const gradient = ctx.createLinearGradient(0, 0, 0, height);
6039
+ gradient.addColorStop(0, `rgba(${r}, ${g}, ${b}, 0)`);
6040
+ gradient.addColorStop(1, `rgba(${r}, ${g}, ${b}, 0.5)`);
6041
+ ctx.fillStyle = gradient;
6042
+ } else ctx.fillStyle = `rgba(${r}, ${g}, ${b}, 1)`;
6040
6043
  ctx.fill();
6041
6044
  };
6042
6045
  for(let i = 0; i < len; i += 1){
package/package.json CHANGED
@@ -5,6 +5,6 @@
5
5
  "types": "index.d.ts",
6
6
  "author": "Hxgh",
7
7
  "license": "MIT",
8
- "version": "1.1.10",
8
+ "version": "1.1.11",
9
9
  "private": false
10
10
  }