File tree Expand file tree Collapse file tree 2 files changed +14
-54
lines changed
Expand file tree Collapse file tree 2 files changed +14
-54
lines changed Original file line number Diff line number Diff line change 6262 "max" : 1
6363 },
6464 "topvalues" : {
65- "min" : 1 ,
65+ "min" : 0 ,
6666 "max" : 1
6767 },
6868 "bottomvalues" : {
69+ "min" : 0 ,
6970 "max" : 1
7071 },
7172 "warningstate" : {
72- "max" : 1
73+ "max" : 0
7374 },
7475 "toppercentdate" : {
75- "max" : 1
76+ "max" : 0
7677 },
7778 "bottompercentdate" : {
78- "max" : 1
79+ "max" : 0
7980 }
8081 },
8182 {
8485 "max" : 1
8586 },
8687 "topvalues" : {
88+ "min" : 1 ,
8789 "max" : 1
8890 },
8991 "bottomvalues" : {
90- "min" : 1 ,
92+ "min" : 0 ,
9193 "max" : 1
9294 },
9395 "warningstate" : {
102104 },
103105 {
104106 "axis" : {
105- "max" : 0
107+ "min" : 1 ,
108+ "max" : 1
106109 },
107110 "topvalues" : {
111+ "min" : 0 ,
108112 "max" : 1
109113 },
110114 "bottomvalues" : {
115+ "min" : 1 ,
111116 "max" : 1
112117 },
113118 "warningstate" : {
114- "max" : 0
115- },
116- "toppercentdate" : {
117- "max" : 0
118- },
119- "bottompercentdate" : {
120- "max" : 0
121- }
122- },
123- {
124- "axis" : {
125119 "max" : 1
126120 },
127- "topvalues" : {
128- "max" : 0
129- },
130- "bottomvalues" : {
131- "max" : 1
132- },
133- "warningstate" : {
134- "max" : 0
135- },
136121 "toppercentdate" : {
137- "max" : 0
138- },
139- "bottompercentdate" : {
140- "max" : 0
141- }
142- },
143- {
144- "axis" : {
145122 "max" : 1
146123 },
147- "topvalues" : {
148- "max" : 1
149- },
150- "bottomvalues" : {
151- "max" : 0
152- },
153- "warningstate" : {
154- "max" : 0
155- },
156- "toppercentdate" : {
157- "max" : 0
158- },
159124 "bottompercentdate" : {
160- "max" : 0
125+ "max" : 1
161126 }
162127 }
163- ],
128+ ],
164129 "categorical" : {
165130 "categories" : {
166131 "dataReductionAlgorithm" : {
Original file line number Diff line number Diff line change @@ -492,15 +492,10 @@ export class DualKpi implements IVisual {
492492 try {
493493 const dataView : DataView = this . dataView = options . dataViews && options . dataViews [ 0 ] ;
494494
495- const hasAxis = dataView ?. categorical ?. categories ?. some ( category => category . source . roles [ "axis" ] ) ;
496- const hasTopValues = dataView ?. categorical ?. values ?. some ( value => value . source . roles [ "topvalues" ] ) ;
497- const hasBottomValues = dataView ?. categorical ?. values ?. some ( value => value . source . roles [ "bottomvalues" ] ) ;
498-
499495 if ( ! dataView ||
500496 ! dataView . metadata ||
501497 ! dataView . metadata . columns ||
502- ( ! hasBottomValues && ! hasTopValues ) ||
503- ! hasAxis
498+ ! dataView . categorical . values
504499 ) {
505500
506501 this . displayRootElement ( false ) ;
You can’t perform that action at this time.
0 commit comments