javascript - 如何使用 z-index css 覆盖 SVG 折线点
问题描述
我正在使用 VueJS 和 SVG 创建一个 3D 柱形图,在其中我已经成功地实现了该图表,但在将一组多段线点重叠在一起形成柱状图时遇到了困难。
我的 3D 图表在下面
但我希望列像此示例图表那样叠加
我已经通过在每个系列上用计数器改变索引来设置 z-index,希望它们会相互叠加,但我无法让它工作。
这是我的代码行
<g>
<template v-for="(points,i) in barColumnPlot">
<template v-for="(point,j) in points.series">
<g style="stroke-width:1;" :stroke="point.stroke" :fill="point.stroke" fill-opacity="0.9" :style="'z-index:'+point.zIndex+';'">
<polyline :points="point.front" />
<polyline :points="point.right" />
<polyline :points="point.top" />
</g>
</template>
</template>
</g>
请我需要帮助。
解决方案
推荐阅读
- javascript - 吊装过程中会发生什么?
- sql-server - 如何在spring boot应用程序的sql server application.properties中添加createDatabaseIfNotExist
- spring-cloud-stream - test stream-rabbitmq 出现错误:Dispatcher has no subscribers for channel
- javascript - 如何在 JavaScript 中动态生成表单?
- reactjs - React 组件在一次使用后消失
- angular - 如何使此表单验证适用于自定义文件上传字段
- apache-spark - 如何确定火花工作中执行者的确切数量?他们有什么公式吗?
- firebase - Power BI api 连接到 Firebase 函数
- algorithm - 为什么 DFS 在无向图中检测循环的时间复杂度是 O(|V|) 而不是 O(|V| + |E|)?
- python - 如何将 sigmoid 激活函数输出转换为 0 和 1?