Skip to content

Commit

Permalink
import util and add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
penqe committed May 9, 2024
1 parent da73fef commit 87daf55
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions stanzas/barchart/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
axisLeft,
} from "d3";
import getStanzaColors from "../../lib/ColorGenerator";
import { toggleSelectIds, emitSelectedEvent } from "../../lib/utils";

export default class Barchart extends MetaStanza {
xAxisGen: Axis;
Expand Down Expand Up @@ -474,6 +475,9 @@ export default class Barchart extends MetaStanza {
}

handleEvent(event) {
console.trace(event.detail);
console.log(this.params["event-incoming_change_selected_nodes"]);
console.log(event.detail === this.params["data-url"]);
const { dataUrl } = event.detail;
if (
this.params["event-incoming_change_selected_nodes"] &&
Expand Down Expand Up @@ -654,6 +658,7 @@ function emitSelectedEventByHistogram(this: Barchart, ids: any[]) {
}

function changeSelectedStyle(this: Barchart, ids: string[]) {
console.log(ids, this.params["data-interpretation"]);
switch (this.params["data-interpretation"]) {
case "categorical":
{
Expand All @@ -667,6 +672,7 @@ function changeSelectedStyle(this: Barchart, ids: string[]) {
case "distribution":
{
const bars = this._graphArea.selectAll("g.bar");
console.log(bars);
bars.classed("-selected", (d) =>
d["__values__"].some((value) =>
ids.includes(value["__togostanza_id__"])
Expand Down
2 changes: 1 addition & 1 deletion stanzas/pagination-table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class PaginationTable extends Stanza {
}

handleEvent(event) {
console.log(this.params["event-incoming_change_selected_nodes"])
console.log(event, this.params["event-incoming_change_selected_nodes"]);
if (this.params["event-incoming_change_selected_nodes"]) {
this._component.updateSelectedRows(event.detail);
}
Expand Down
1 change: 1 addition & 0 deletions stanzas/treemap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default class TreeMapStanza extends MetaStanza {
}

handleEvent(event) {
console.log(event.detail);
const { selectedIds, dataUrl } = event.detail;

if (
Expand Down

0 comments on commit 87daf55

Please sign in to comment.