Comparing version 0.1.1-beta.18 to 0.1.1-beta.19
@@ -146,3 +146,2 @@ import { StyleSheet, css } from 'aphrodite/no-important.js'; | ||
const isTransposed = u.scales.y.ori === 0 && u.axes[1].side === 2; | ||
console.log(isTransposed); | ||
const [i0, i1] = u.series[0].idxs; | ||
@@ -149,0 +148,0 @@ const d = u.data[0]; |
@@ -55,4 +55,2 @@ import { StyleSheet, css } from 'aphrodite/no-important.js'; | ||
if (!this.container) { | ||
const data = this.getLegend(); | ||
this.inactivatedSet = new Set(data.map(d => d.name)); | ||
this.create(); | ||
@@ -138,4 +136,3 @@ } | ||
legendItemClick(props) { | ||
const currentStatus = !props.activated; | ||
if (currentStatus) { | ||
if (props.activated) { | ||
this.inactivatedSet.delete(props.name); | ||
@@ -150,12 +147,11 @@ } | ||
const data = this.ctrl.getData(); | ||
const res = data | ||
return data | ||
.map(({ name, color }) => ({ | ||
name, | ||
color, | ||
activated: this.inactivatedSet.has(name), | ||
activated: !this.inactivatedSet.has(name), | ||
})) | ||
.filter(d => d.name); | ||
return res; | ||
} | ||
} | ||
//# sourceMappingURL=legend.js.map |
@@ -1,3 +0,1 @@ | ||
/// <reference types="react" resolution-mode="require"/> | ||
/// <reference types="web" /> | ||
import UPlot from 'uplot'; | ||
@@ -4,0 +2,0 @@ import { Data, Size } from '../types/index.js'; |
@@ -147,10 +147,10 @@ import { cloneDeep, merge, mergeWith, omit, isFunction, get } from 'lodash'; | ||
const no = ySeries.every(d => d.label !== s.label); | ||
if (legend.inactivatedSet.has(s.label)) { | ||
s.show = false; | ||
} | ||
// if (legend.inactivatedSet.has(s.label)) { | ||
// s.show = false; | ||
// } | ||
if (no && index) { | ||
this.uPlot.addSeries(s, this.uPlot.series.length); | ||
return; | ||
// return; | ||
} | ||
this.uPlot.setSeries(this.uPlot.series.length + 1, { show: false }); | ||
// this.uPlot.setSeries(this.uPlot.series.length + 1, { show: false }); | ||
}); | ||
@@ -157,0 +157,0 @@ this.uPlot.setData(data); |
{ | ||
"name": "zz-chart", | ||
"version": "0.1.1-beta.18", | ||
"version": "0.1.1-beta.19", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "author": "Alauda", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
685259
17149