滝グラフウィジェットで動的バインドを使用して、別の SAQL クエリから Y 軸の customDomain (最小/最大範囲) を設定している場合、検索条件の選択によってそのクエリが 0 件の結果を返すと、チャートがクラッシュしてバーが完全に消えます。
ユーザー側での表示:
customDomain バインドのシリアライズを .asString() から .asObject() に切り替えます。.asObject() メソッドが null 値を適切に処理し、チャートが復旧不可能なエラー状態に陥らないようにします。
変更前:"high": "{{cell(max_value_query.result, 0, "maxValue").asString()}}"
変更後:"high": "{{cell(max_value_query.result, 0, "maxValue").asObject()}}"さらに、coalesce() を使用して SAQL クエリに null 対策を追加して、条件に一致するデータがない場合でも少なくともデフォルト値が確実に返されるようにします。
q = load "dataset";
q = group q by all;
q = foreach q generate max('Value') as 'maxValue';
q = foreach q generate coalesce('maxValue', 100) as 'maxValue';
group by all 句により、現在の検索条件に一致するレコードがない場合でも、クエリが必ず 1 行を返すようになります。
追加のガイダンス:
注意:これはバインドされたクエリが null または 0 行を返す可能性がある場合に、滝、棒、折れ線など、動的 customDomain バインドを使用するすべてのチャートタイプに適用されます。
005433455

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.