mirror of
https://github.com/apache/superset.git
synced 2026-05-06 00:14:21 +00:00
Compare commits
3 Commits
feat/react
...
chore/remo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5c6081d6f | ||
|
|
881a62def4 | ||
|
|
fe17bead62 |
6
superset-frontend/package-lock.json
generated
6
superset-frontend/package-lock.json
generated
@@ -79,7 +79,6 @@
|
||||
"chrono-node": "^2.9.0",
|
||||
"classnames": "^2.2.5",
|
||||
"content-disposition": "^1.1.0",
|
||||
"d3-color": "^3.1.0",
|
||||
"d3-scale": "^4.0.2",
|
||||
"dayjs": "^1.11.20",
|
||||
"dom-to-image-more": "^3.7.2",
|
||||
@@ -52758,9 +52757,9 @@
|
||||
"dependencies": {
|
||||
"d3": "^3.5.17",
|
||||
"d3-array": "^3.2.4",
|
||||
"d3-color": "^3.1.0",
|
||||
"datamaps": "^0.5.10",
|
||||
"prop-types": "^15.8.1"
|
||||
"prop-types": "^15.8.1",
|
||||
"tinycolor2": "^1.6.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@apache-superset/core": "*",
|
||||
@@ -53287,7 +53286,6 @@
|
||||
"@types/geojson": "^7946.0.16",
|
||||
"bootstrap-slider": "^11.0.2",
|
||||
"d3-array": "^3.2.4",
|
||||
"d3-color": "^3.1.0",
|
||||
"d3-scale": "^4.0.2",
|
||||
"handlebars": "^4.7.9",
|
||||
"lodash": "^4.18.1",
|
||||
|
||||
@@ -160,7 +160,6 @@
|
||||
"chrono-node": "^2.9.0",
|
||||
"classnames": "^2.2.5",
|
||||
"content-disposition": "^1.1.0",
|
||||
"d3-color": "^3.1.0",
|
||||
"d3-scale": "^4.0.2",
|
||||
"dayjs": "^1.11.20",
|
||||
"dom-to-image-more": "^3.7.2",
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"dependencies": {
|
||||
"d3": "^3.5.17",
|
||||
"d3-array": "^3.2.4",
|
||||
"d3-color": "^3.1.0",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"datamaps": "^0.5.10",
|
||||
"prop-types": "^15.8.1"
|
||||
},
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { rgb } from 'd3-color';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import { ChartProps, getValueFormatter } from '@superset-ui/core';
|
||||
|
||||
export default function transformProps(chartProps: ChartProps) {
|
||||
@@ -75,7 +75,7 @@ export default function transformProps(chartProps: ChartProps) {
|
||||
maxBubbleSize: parseInt(maxBubbleSize, 10),
|
||||
showBubbles,
|
||||
linearColorScheme,
|
||||
color: rgb(r, g, b).hex(),
|
||||
color: tinycolor({ r, g, b }).toHexString(),
|
||||
colorBy,
|
||||
colorScheme,
|
||||
sliceId,
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
"@types/geojson": "^7946.0.16",
|
||||
"bootstrap-slider": "^11.0.2",
|
||||
"d3-array": "^3.2.4",
|
||||
"d3-color": "^3.1.0",
|
||||
"d3-scale": "^4.0.2",
|
||||
"handlebars": "^4.7.9",
|
||||
"lodash": "^4.18.1",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { rgb } from 'd3-color';
|
||||
import tinycolor from 'tinycolor2';
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export function hexToRGB(
|
||||
@@ -26,7 +26,7 @@ export function hexToRGB(
|
||||
if (!hex) {
|
||||
return [0, 0, 0, alpha];
|
||||
}
|
||||
const { r, g, b } = rgb(hex);
|
||||
const { r, g, b } = tinycolor(hex).toRgb();
|
||||
|
||||
return [r, g, b, alpha];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user