mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-13 08:12:51 +02:00
refactor(insights:flows): improve readability when there's a lot of nodes
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<div class="show-loading" hx-get="{% url 'insights_sankey_by_currency' %}" hx-trigger="updated from:window"
|
<div class="show-loading" hx-get="{% url 'insights_sankey_by_currency' %}" hx-trigger="updated from:window"
|
||||||
hx-swap="outerHTML" hx-include="#picker-form, #picker-type">
|
hx-swap="outerHTML" hx-include="#picker-form, #picker-type">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="chart-container position-relative tw-min-h-[60vh] tw-max-h-[60vh] tw-h-full tw-w-full"
|
<div class="chart-container position-relative tw-min-h-[85vh] tw-max-h-[85vh] tw-h-full tw-w-full"
|
||||||
id="sankeyContainer"
|
id="sankeyContainer"
|
||||||
_="init call setupSankeyChart() end">
|
_="init call setupSankeyChart() end">
|
||||||
<canvas id="sankeyChart"></canvas>
|
<canvas id="sankeyChart"></canvas>
|
||||||
@@ -64,6 +64,7 @@
|
|||||||
alpha: 0.5,
|
alpha: 0.5,
|
||||||
size: 'max',
|
size: 'max',
|
||||||
color: "white",
|
color: "white",
|
||||||
|
nodePadding: 30,
|
||||||
priority: data.nodes.reduce((acc, node) => {
|
priority: data.nodes.reduce((acc, node) => {
|
||||||
acc[node.id] = node.priority;
|
acc[node.id] = node.priority;
|
||||||
return acc;
|
return acc;
|
||||||
@@ -77,6 +78,9 @@
|
|||||||
options: {
|
options: {
|
||||||
responsive: true,
|
responsive: true,
|
||||||
maintainAspectRatio: false,
|
maintainAspectRatio: false,
|
||||||
|
layout: {
|
||||||
|
padding: 20
|
||||||
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
callbacks: {
|
callbacks: {
|
||||||
|
|||||||
Reference in New Issue
Block a user