File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
libs/dataset-explorer/src/lib Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,11 @@ export function getDatasetBar(
24
24
chartProps ?. xAxis . property &&
25
25
jointData . metaDict [ chartProps . xAxis . property ] . sortedCategoricalValues
26
26
?. length ;
27
+ const noneGroup = "none" ;
27
28
28
29
if ( customData && xData ) {
29
30
for ( const [ i , customDatum ] of customData . entries ( ) ) {
30
- const yValue = ( customDatum as any ) . Y ;
31
+ const yValue = ( customDatum as any ) . Y ?? noneGroup ;
31
32
if ( ! groupedData [ yValue ] ) {
32
33
groupedData [ yValue ] = new Array ( xDataTypeCount ) . fill ( 0 ) ;
33
34
}
@@ -36,9 +37,9 @@ export function getDatasetBar(
36
37
}
37
38
38
39
if ( chartProps ?. yAxis . property ) {
39
- jointData . metaDict [
40
- chartProps . yAxis . property
41
- ] . sortedCategoricalValues ? .forEach ( ( value ) => {
40
+ const groups = jointData . metaDict [ chartProps . yAxis . property ]
41
+ . sortedCategoricalValues ?? [ noneGroup ] ;
42
+ groups . forEach ( ( value ) => {
42
43
result . push ( {
43
44
data : groupedData [ value ] ,
44
45
name : value
You can’t perform that action at this time.
0 commit comments