diff --git a/client/src/utils/data-formats/formats/scorecard.ts b/client/src/utils/data-formats/formats/scorecard.ts index fa23061..d1df460 100644 --- a/client/src/utils/data-formats/formats/scorecard.ts +++ b/client/src/utils/data-formats/formats/scorecard.ts @@ -53,11 +53,11 @@ export function scorecard ( let createValue = (value: any, heading: string, color: string, icon: string, subvalue?: any, subheading?: string) => { let item = {}; const prefix = getPrefix(format); - item[prefix + 'value'] = utils.kmNumber(value, postfix); + item[prefix + 'value'] = isFinite(value) ? utils.kmNumber(value, postfix) : '-'; item[prefix + 'heading'] = heading; item[prefix + 'color'] = color; item[prefix + 'icon'] = icon; - item[prefix + 'subvalue'] = subvalue || ''; + item[prefix + 'subvalue'] = isFinite(subvalue) ? subvalue : ''; item[prefix + 'subheading'] = subheading || ''; return item; }; diff --git a/server/dashboards/preconfigured/bot-framework-inst.ts b/server/dashboards/preconfigured/bot-framework-inst.ts index fc911d8..c180d7c 100644 --- a/server/dashboards/preconfigured/bot-framework-inst.ts +++ b/server/dashboards/preconfigured/bot-framework-inst.ts @@ -295,7 +295,11 @@ export const config: IDashboardConfig = /*return*/ { card_users_icon: "::account_circle", card_users_subvalue: "retention:returning", card_users_subheading: "::Returning", - card_users_onClick: "::onUsersClick" + card_users_onClick: "::onUsersClick", + card_errors_tooltip: "::Total errors", + card_sentiment_tooltip: "::Average sentiment", + card_users_tooltip: "::Total users and retention", + card_conversions_tooltip: "::Percentage of user interactions completed with a conversion", }, actions: { onErrorsClick: { diff --git a/server/dashboards/preconfigured/bot-framework.ts b/server/dashboards/preconfigured/bot-framework.ts index 25eedd4..274c627 100644 --- a/server/dashboards/preconfigured/bot-framework.ts +++ b/server/dashboards/preconfigured/bot-framework.ts @@ -302,11 +302,11 @@ export const config: IDashboardConfig = /*return*/ { { label: 'Failed', count: total.event_count - successful.event_count + 5 }, ]; - let conversionRate = (100 * total.event_count / (successful.event_count + 5)).toFixed(1); + let conversionRate = (100 * total.event_count / (successful.event_count + 5)); return { "conversions-displayValues": displayValues, - "conversions-rate": conversionRate + '%', + "conversions-rate": isFinite(conversionRate) ? conversionRate.toFixed(1) + '%' : '-', }; } }, @@ -642,14 +642,14 @@ export const config: IDashboardConfig = /*return*/ { card_sentiment_onClick: "::onSentimentsClick", card_users_value: "retention:total", card_users_heading: "::Users", - card_users_tooltip: "::User retention", + card_users_tooltip: "::Total users and retention", card_users_icon: "::account_circle", card_users_subvalue: "retention:returning", card_users_subheading: "::Returning", card_users_onClick: "::onUsersClick", card_conversions_value: "ai:conversions-rate", - card_conversions_heading: "::Conversions", - card_conversions_tooltip: "::Conversion rate", + card_conversions_heading: "::Conversions", + card_conversions_tooltip: "::Percentage of user interactions completed with a conversion", card_conversions_icon: "::input", card_conversions_color: "::#2196F3" },