diff --git a/src/views/InteractionsFlowView.vue b/src/views/InteractionsFlowView.vue
index de76c8d..ee60790 100644
--- a/src/views/InteractionsFlowView.vue
+++ b/src/views/InteractionsFlowView.vue
@@ -6,16 +6,16 @@ import * as align from "d3-sankey";
import { sankey, sankeyLinkHorizontal } from "d3-sankey";
import { v4 as uuidv4 } from "uuid";
-const filterOptions = ['Channel', 'SubChannel', 'Queue', 'Outcome']
-const multiSelected = ref(filterOptions)
+const filterOptions = ["Channel", "SubChannel", "Queue", "Outcome"];
+const multiSelected = ref(filterOptions);
-const alignOptions = ['Left', 'Center', 'Right', 'Justify']
-const alignSelected = ref('Left')
+const alignOptions = ["Left", "Center", "Right", "Justify"];
+const alignSelected = ref("Left");
const errorMessage = ref(null);
onMounted(() => {
- fetchData()
+ fetchData();
});
function fetchData() {
@@ -23,7 +23,9 @@ function fetchData() {
errorMessage.value = null;
fetch(
- `${import.meta.env.VITE_EO_SERVICES_URL}/api/interactions-flow?filter=${multiSelected.value}`,
+ `${import.meta.env.VITE_EO_SERVICES_URL}/api/interactions-flow?filter=${
+ multiSelected.value
+ }`,
{
credentials: "include", // fetch won't send cookies unless you set credentials
}
@@ -46,7 +48,6 @@ function fetchData() {
}
function generateSankey(data) {
-
// filter data
// const filteredData
@@ -63,7 +64,7 @@ function generateSankey(data) {
// ["target", "target"]
// clear the old svg
- d3.select("#chart").select("svg").remove()
+ d3.select("#chart").select("svg").remove();
// Create a SVG container.
const svg = d3
@@ -77,7 +78,13 @@ function generateSankey(data) {
// Constructs and configures a Sankey generator.
const sankeyGen = sankey()
.nodeId((d) => d.name)
- .nodeAlign(align[`sankey${alignSelected.value[0].toUpperCase()}${alignSelected.value.slice(1)}`]) // d3.sankeyLeft, etc.
+ .nodeAlign(
+ align[
+ `sankey${alignSelected.value[0].toUpperCase()}${alignSelected.value.slice(
+ 1
+ )}`
+ ]
+ ) // d3.sankeyLeft, etc.
.nodeWidth(15)
.nodePadding(10)
.extent([
@@ -147,10 +154,10 @@ function generateSankey(data) {
linkColor === "source-target"
? (d) => `url(#${d.uid})`
: linkColor === "source"
- ? (d) => color(d.source.category)
- : linkColor === "target"
- ? (d) => color(d.target.category)
- : linkColor
+ ? (d) => color(d.source.category)
+ : linkColor === "target"
+ ? (d) => color(d.target.category)
+ : linkColor
)
.attr("stroke-width", (d) => Math.max(1, d.width));
@@ -178,7 +185,7 @@ function generateSankey(data) {
-