Skip to content

Commit

Permalink
Merge pull request #203 from nzzdev/release-3.4.2
Browse files Browse the repository at this point in the history
Release 3.4.2
  • Loading branch information
fgervasi authored Feb 15, 2021
2 parents 09a0560 + 69b2369 commit e2ed586
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 23 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "q-chart",
"version": "3.4.1",
"version": "3.4.2",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
10 changes: 7 additions & 3 deletions styles_src/q-chart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
}

.q-chart-events {
margin: 0 4px;
margin-top: 4px;
display: flex;
flex-direction: row;
align-items: flex-start;
}

.q-chart-events__icon {
height: 18px;
width: 18px;
margin-right: 4px;
}

.q-chart-events__label {
display: flex;
align-items: center;
margin-left: 4px;
}
41 changes: 23 additions & 18 deletions views/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,29 @@
style="margin: 15px -4px; display: flex; flex-wrap: wrap;"
>
{%- for event in events.data %}
<div class="q-chart q-chart-events">
<div class="q-chart-events" style="margin-right: 4px; margin-left: 4px;"
>
{% set radius = events.config.radius %}
<svg width="{{ 2 * radius + 2 }}" height="{{ 2 * radius + 2 }}" style="vertical-align: sub;">
<g transform="translate({{ radius + 1 }}, {{ radius + 1 }})">
<path
d="M{{ radius }},0A{{ radius }},{{ radius }},0,1,1,-{{ radius }},0A{{ radius }},{{ radius }},0,1,1,{{ radius }},0"
style="fill: none; stroke: currentColor; stroke-width: 1;"
></path>
<text
y="4"
text-anchor="middle"
style="font-size: {{ events.config.fontSize }}px; font-weight: {{ events.config.fontWeight }}; fill: currentColor;"
>
{{ loop.index }}
</text>
</g>
</svg>
<span class="q-chart q-chart-events__label">{{ event.label }}</span>
</div style="margin: 0 4px;">
<div class="q-chart-events__icon">
<svg width="{{ 2 * radius + 2 }}" height="{{ 2 * radius + 2 }}">
<g transform="translate({{ radius + 1 }}, {{ radius + 1 }})">
<circle
r="{{ radius }}"
fill="none"
stroke="currentColor"
stroke-width="1"
/>
<text
y="4"
text-anchor="middle"
style="font-size: {{ events.config.fontSize }}px; font-weight: {{ events.config.fontWeight }}; fill: currentColor;"
>
{{ loop.index }}
</text>
</g>
</svg>
</div>
<div class="q-chart-events__label">{{ event.label }}</div>
</div>
{%- endfor %}
</div>

0 comments on commit e2ed586

Please sign in to comment.