nullValueAlias

nullValueAlias

Description

nullValueAlias allows you to customize how null values are returned in charts.

This property is available for the following chart types:

  • Area Charts
  • Bar Charts
  • Combo Charts
  • Line Charts
  • Pie Charts
  • Basic Tables
  • Pivot Tables

null values for tables also be overriden using the textOverrides property with the table.no_value_replacement and table_cell.no_value_replacement keys.

<Vizzly.Dashboard
  // ...
  nullValueAlias={({ dataSetId, fieldId }) => {
    // Customize label for a specific field
    if (fieldId === 'field-id' && dataSetId === 'data-set-id') {
      return `Custom No Value`; // Defaults to 'No value'
    }
  }}
/>

Default Values

import Vizzly, { type VizzlyTheming } from '@vizzly/dashboard';
 
export function Dashboard() {
  return (
    <Vizzly.Dashboard
      // ...
      nullValueAlias={({ dataSetId, fieldId }) => {
        return `No value`; // Default Value
      }}
    />
  );
}