We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
请问如何使bar中的条形图自动填充上颜色,而不是点击时才有颜色 How to make bar graph in bar automatically fill with color instead of color when clicking
The text was updated successfully, but these errors were encountered:
目前依赖的绘图库不支持这个,可能你需要在生成的html里面自己手动加一点东西。
// 填充的颜色,这是默认的颜色列表。 const color = ['#dd4528', '#28a3dd', '#f3db52', '#ed84b5', '#4ab74e', '#9179c0', '#8e6d5a', '#f19839', '#949494'] document.querySelectorAll(".xkcd-chart-bar").forEach((it, idx) => { it.setAttribute("fill", color[idx]) it.addEventListener("mouseout", () => { document.querySelectorAll(".xkcd-chart-bar").forEach((it, idx) => { it.setAttribute("fill", color[idx]) }) }) })
当你设置了colors: Optional[Iterable] = None label 颜色数组时,替换上面的color颜色数组使其和你设置的保持一致。
colors: Optional[Iterable] = None label 颜色数组
Sorry, something went wrong.
No branches or pull requests
请问如何使bar中的条形图自动填充上颜色,而不是点击时才有颜色
How to make bar graph in bar automatically fill with color instead of color when clicking
The text was updated successfully, but these errors were encountered: