Skip to content

Commit

Permalink
fix cube heatmap min max
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-donarise committed Sep 1, 2024
1 parent 3796bb3 commit e0a455b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plot/cube/cube.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,12 @@ namespace $.$$ {
@ $mol_mem
points_traversed() {

const jsons = this.multi_jsons() ?? [ this.json() ]

const values_by_label: Record<
string/*json index*/,
Map< string/*point label*/, number/*v*/ >
> = Object.fromEntries( this.multi_jsons().map( (j: any, i:number )=> [i, new Map] ) )
> = Object.fromEntries( jsons.map( (j: any, i:number )=> [i, new Map] ) )

let value_min = Infinity
let value_max = -Infinity
Expand All @@ -185,7 +187,7 @@ namespace $.$$ {
let points_y: number[] = []
let points_z: number[] = []

this.multi_jsons().map( (json: any, index: number) => {
jsons.map( (json: any, index: number) => {

const points = $mpds_visavis_plot_cube_json( json ).payload.points
points.labels.forEach( (label, i)=> {
Expand Down

0 comments on commit e0a455b

Please sign in to comment.