Skip to content

Commit

Permalink
refactor: move all grid lines to different g tag
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienDeveaux committed Dec 20, 2024
1 parent 09fc231 commit c7a0a8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ class MiniGraphCard extends LitElement {
return svg`
<svg width='100%' height=${height !== 0 ? '100%' : 0} viewBox='0 0 500 ${height}'
@click=${e => e.stopPropagation()}>
${grid_lines_type ? this.renderGridLines() : ''}
<g>
${grid_lines_type ? this.renderGridLines() : ''}
<defs>
${this.renderSvgGradient(this.gradient)}
</defs>
Expand Down Expand Up @@ -574,7 +574,7 @@ class MiniGraphCard extends LitElement {
lines.push(svg`<line x1=${x} y1="0" x2=${x} y2=${height} stroke="${stroke}" stroke-width="0.5"/>`);
}

return lines;
return svg`<g>${lines}</g>`;
}

setTooltip(entity, index, value, label = null) {
Expand Down

0 comments on commit c7a0a8b

Please sign in to comment.