Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HeatMap Chart Not Support rgba / 8HEX To RGBA error #4316

Closed
leejongheon42 opened this issue Mar 11, 2024 · 1 comment
Closed

HeatMap Chart Not Support rgba / 8HEX To RGBA error #4316

leejongheon42 opened this issue Mar 11, 2024 · 1 comment
Labels

Comments

@leejongheon42
Copy link

leejongheon42 commented Mar 11, 2024

Description

When using a HeatMap Chart, rgba not supported.

Steps to Reproduce

// RGBA Error
const DEFAULT_HEAT_MAP_COLOR_SCALE = [
"rgba(99, 70, 155, 0.2)",
"rgba(99, 70, 155, 0.4)",
"rgba(99, 70, 155, 0.6)",
"rgba(99, 70, 155, 0.8)",
"rgba(99, 70, 155, 1)",
];

plotOptions: {
heatmap: {
colorScale: {
ranges: DEFAULT_HEAT_MAP_COLOR_SCALE.map((color, index) => {
return {
from: index * colorScaleChunkSize,
to: (index + 1) * colorScaleChunkSize,
color: color
}
})
}
}
},
// HEX8 Error
const DEFAULT_HEAT_MAP_COLOR_SCALE = [
"#63469B33",
"#63469B66",
"#63469B99",
"#63469BCC",
"#63469B",
];

plotOptions: {
heatmap: {
colorScale: {
ranges: DEFAULT_HEAT_MAP_COLOR_SCALE.map((color, index) => {
return {
from: index * colorScaleChunkSize,
to: (index + 1) * colorScaleChunkSize,
color: color
}
})
}
}
},
Error Message
key: "hexToRgba",
value: function () {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "#999999",
e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : .6;
"#" !== t.substring(0, 1) && (t = "#999999");
var i = t.replace("#", "");
i = i.match(new RegExp("(.{" + i.length / 3 + "})", "g"));
for (var a = 0; a < i.length; a++) i[a] = parseInt(1 === i[a].length ? i[a] + i[a] : i[a], 16);
return void 0 !== e && i.push(e), "rgba(" + i.join(",") + ")";
}

Expected Behavior

it present RGBA color

Actual Behavior

Not Supported RGBA / Its present RGB color

Screenshots

image
image

@leejongheon42 leejongheon42 added the bug Something isn't working label Mar 11, 2024
@leejongheon42 leejongheon42 changed the title HeatMap Chart Not Support rgba / 8HEX HeatMap Chart Not Support rgba / 8HEX To RGBA error Mar 11, 2024
@brianlagunas brianlagunas added feature-request New feature or request and removed bug Something isn't working labels Mar 11, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants