3D Bar.

PRO

Represent combinations of two categories with bars of varying height.

Live preview35 feature examples

LIVE EXAMPLE

Quarter and product comparison

Match the page theme
Interact with the chart to see selection and range-change results here.
OptionsChanges are reflected in the preview and code.
Appearance and style3
Legend and interaction13
Title and dimensions3

Represent combinations of X and Y categories as Z heights. All values are sample data.

View code
Current preview
<div id="chart-container" style="width: 100%; min-width: 0;"></div>

<script type="module">
  import { defineCustomElement as define0 } from '@syidax/advanced-pro/components/sy-bar-3d.js';
  define0();

  // Pro: complete registerLicense at app startup using your issued certificate.
  // The website preview certificate is not for use in customer apps.
  const specs = [
    {
      "id": "example-chart",
      "tag": "sy-bar-3d",
      "props": {
        "data": [
          {
            "x": "Q1",
            "y": "A",
            "z": 12
          },
          {
            "x": "Q2",
            "y": "A",
            "z": 19
          },
          {
            "x": "Q3",
            "y": "A",
            "z": 26
          },
          {
            "x": "Q4",
            "y": "A",
            "z": 33
          },
          {
            "x": "Q1",
            "y": "B",
            "z": 40
          },
          {
            "x": "Q2",
            "y": "B",
            "z": 17
          },
          {
            "x": "Q3",
            "y": "B",
            "z": 24
          },
          {
            "x": "Q4",
            "y": "B",
            "z": 31
          },
          {
            "x": "Q1",
            "y": "C",
            "z": 38
          },
          {
            "x": "Q2",
            "y": "C",
            "z": 15
          },
          {
            "x": "Q3",
            "y": "C",
            "z": 22
          },
          {
            "x": "Q4",
            "y": "C",
            "z": 29
          }
        ],
        "width": 640,
        "height": 360,
        "brandPosition": "bottom-right",
        "brandLogo": ""
      }
    }
  ];
  const container = document.querySelector('#chart-container');
  const elements = specs.map(({ tag, id, props }) => {
    const element = document.createElement(tag);
    element.id = id;
    Object.assign(element, props);
    element.setAttribute('aria-label', 'bar-3d example chart');
    return element;
  });
  container.replaceChildren(...elements);
  const chart = elements.at(-1);
  const onEvent = event => {
    console.log('pointClick', event.detail);
  };
  chart.addEventListener('pointClick', onEvent);
  const observer = new ResizeObserver(([entry]) => {
    const width = Math.max(160, Math.floor(entry.contentRect.width));
    elements.forEach(element => { element.width = width; });
  });
  observer.observe(container);

  // In an SPA, call this function when the view is disposed.
  function disposeChart() {
    observer.disconnect();
    chart.removeEventListener('pointClick', onEvent);
    container.replaceChildren();
  }
</script>

Usage and data

#

Arrange magnitudes across intersecting categories, such as products and quarters, in space.

Bars at the back may be hidden. Provide a 2D Heatmap or table as well.

Data contract

PropertyInput format
dataAn array of { x, y, z, color? }. x and y are categories; z is bar height.

Updating data

Assign a new array or object to the property instead of mutating values inside an array. Chart events provide selection results through event.detail. When disposing of the view, clean up ResizeObserver and event listeners registered by your app.

Feature examples

#

Try 35 interactive feature examples and inspect their code. Select “Edit in preview” to combine more options in the settings panel above.

Bar width and depthPRO

Adjust bar spacing along the X and Y directions.

Interact with the chart to see results here.
View code

Translucent barsPRO

Inspect overlapping bars using translucency.

Interact with the chart to see results here.
View code

Inspect values with the pointerPRO

Point to data to view the value at that location.

Interact with the chart to see results here.
View code

Crosshair trackingPRO

Move the pointer to read horizontal and vertical coordinates alongside values.

Interact with the chart to see results here.
View code

Replay animationPRO

Redraw the same example to inspect its initial display animation.

Interact with the chart to see results here.
View code

AccessibilityPRO

Compare 1 examples of Accessibility. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

AnimationPRO

Compare 3 examples of Animation. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

AxesPRO

Compare 2 examples of Axes. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

CameraPRO

Compare 3 examples of Camera. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Metrics and itemsPRO

Compare 3 examples of Metrics and items. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

ColorPRO

Compare 4 examples of Color. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

CrosshairPRO

Compare 3 examples of Crosshair. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Data inputPRO

Compare 8 examples of Data input. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

FootprintPRO

Compare 3 examples of Footprint. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

LegendPRO

Compare 1 examples of Legend. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

LightingPRO

Compare 3 examples of Lighting. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

LocalePRO

Compare 1 examples of Locale. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Large datasetsPRO

Compare 2 examples of Large datasets. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

SizePRO

Compare 2 examples of Size. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

TooltipPRO

Compare 13 examples of Tooltip. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Zoom and panPRO

Compare 3 examples of Zoom and pan. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Camera ChangePRO

Compare 1 examples of Camera Change. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Context menuPRO

Compare 1 examples of Context menu. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

HoverPRO

Compare 1 examples of Hover. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Point ClickPRO

Compare 1 examples of Point Click. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Data context menuPRO

Compare 1 examples of Data context menu. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

RuntimePRO

Compare 4 examples of Runtime. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Selection ChangedPRO

Compare 1 examples of Selection Changed. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

CameraPRO

Compare 1 examples of Camera. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

ExportPRO

Compare 1 examples of Export. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Read coordinates and dataPRO

Compare 1 examples of Read coordinates and data. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Runtime APIPRO

Compare 2 examples of Runtime API. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

OptionalPRO

Compare 1 examples of Optional. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Bar3DPRO

Compare 3 examples of Bar3D. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Streaming · Add and update live dataPRO

Compare 3 examples of Add and update live data. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

API reference

#

The full public API for sy-bar-3d. Pass objects and arrays as JavaScript properties. Select a name to view usage code and type definitions.

Key properties

Attribute / PropertyType / DefaultDescription
Bar3DDataDefault: undefinedAn array of { x, y, z, color? }. x and y are categories; z is bar height.
numberDefault: 800Chart width in pixels. Update with ResizeObserver when the container changes.
numberDefault: 480Chart height in pixels.
brandLogostringDefault: undefinedThe default is the Syidax logo. With the Pro chart.branding entitlement, use none or a PNG, JPEG, or WebP data URL.
brandPosition'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'Default: 'bottom-right'The corner where the logo is anchored. Applies equally to Community and Pro, on screen and in image exports.
numberDefault: 1Set as an HTML attribute or JavaScript property. type: number.
booleanDefault: falseWhether to show a legend for series or items.
barWidthnumberDefault: .72Set as an HTML attribute or JavaScript property. type: number.
barDepthnumberDefault: .72Set as an HTML attribute or JavaScript property. type: number.
chartTitlestringDefault: undefinedThe title inside the chart. Explain the data's unit and meaning alongside it.
chartSubtitlestringDefault: undefinedThe subtitle inside the chart.
CartesianTooltipInputDefault: undefinedTooltip settings for pointer-driven values, position, and content.
tooltipEnabledbooleanDefault: trueSet as an HTML attribute or JavaScript property. type: boolean.
CartesianCrosshairInputDefault: undefinedPass as a JavaScript property. type: CartesianCrosshairInput.
animatedbooleanDefault: falseWhether to animate initial display and data changes.
animationDurationnumberDefault: 600Animation duration in milliseconds.
animationEasingBar3DEasingDefault: 'ease-out'Allowed values: linear, ease-out, ease-in, ease-in-out. Default: 'ease-out'.
animationTypeHeatmapAnimationTypeDefault: undefinedAllowed values: initial, update. Default: undefined.
Other properties 21
Attribute / PropertyType / DefaultDescription
HeatmapColorInputDefault: 'viridis'Pass as a JavaScript property. type: HeatmapColorInput.
colorDomainBar3DDomainDefault: undefinedPass as a JavaScript property. type: Bar3DDomain.
missingColorstringDefault: '#94a3b8'Set as an HTML attribute or JavaScript property. type: string.
barSizeScene3DVectorDefault: [2,2,2]Pass as a JavaScript property. type: Scene3DVector.
stringDefault: 'en-US'Set as an HTML attribute or JavaScript property. type: string.
Bar3DAxesOptions|boolean|stringDefault: undefinedPass as a JavaScript property. type: Bar3DAxesOptions|boolean|string.
xCategoriesReadonlyArray<Bar3DCategory>Default: undefinedPass as a JavaScript property. type: ReadonlyArray<Bar3DCategory>.
yCategoriesReadonlyArray<Bar3DCategory>Default: undefinedPass as a JavaScript property. type: ReadonlyArray<Bar3DCategory>.
Scene3DMaterialOptionsDefault: undefinedPass as a JavaScript property. type: Scene3DMaterialOptions.
Scene3DLightingOptionsDefault: undefinedPass as a JavaScript property. type: Scene3DLightingOptions.
Scene3DCameraOptions|stringDefault: undefinedPass as a JavaScript property. type: Scene3DCameraOptions|string.
Orbit3DOptions|boolean|stringDefault: undefinedPass as a JavaScript property. type: Orbit3DOptions|boolean|string.
showEmptybooleanDefault: trueWhether the component shows its own empty-geometry notice.
activeColorstringDefault: '#f59e0b'Set as an HTML attribute or JavaScript property. type: string.
enableMouseTrackingbooleanDefault: trueSet as an HTML attribute or JavaScript property. type: boolean.
tooltipFormat(detail:Bar3DHitDetail)=>stringDefault: undefinedPass as a JavaScript property. type: (detail:Bar3DHitDetail)=>string.
crosshairSnapDistancenumberDefault: 12Set as an HTML attribute or JavaScript property. type: number.
streamSourceBar3DStreamSourceDefault: undefinedA stream source for live data. Check the contract for the specific type.
streamMaxnumberDefault: undefinedThe maximum number of streaming data points to retain.
Bar3DEngineModeDefault: 'auto'Renderer selection: auto, standard, or pro. Engine selection is separate from permission to use a Pro chart type.
Bar3DUnavailableBehaviourDefault: 'fallback'Allowed values: fallback, error. Default: 'fallback'.
Events 16
EventsDetail typeDescription
Bar3DRenderResult&{tier:Bar3DEngineTier}Emits rendering results in detail when chart drawing completes.
Bar3DHitDetailA point selection event. Read the selected data and index from CustomEvent.detail.
Bar3DHitDetail|nullCustomEvent.detail type: Bar3DHitDetail|null. Event names are case-sensitive.
Bar3DSelectionChangeEventDetailCustomEvent.detail type: Bar3DSelectionChangeEventDetail. Event names are case-sensitive.
ChartPointContextMenuEventDetail<Bar3DHitDetail>CustomEvent.detail type: ChartPointContextMenuEventDetail<Bar3DHitDetail>. Event names are case-sensitive.
Bar3DCameraChangeEventDetailCustomEvent.detail type: Bar3DCameraChangeEventDetail. Event names are case-sensitive.
Bar3DCrosshairDetail|nullCustomEvent.detail type: Bar3DCrosshairDetail|null. Event names are case-sensitive.
{count:number;replaced:number}CustomEvent.detail type: {count:number;replaced:number}. Event names are case-sensitive.
{dropped:number}CustomEvent.detail type: {dropped:number}. Event names are case-sensitive.
CartesianTooltipEventDetailWhether to display the built-in tooltip.
voidCustomEvent.detail type: void. Event names are case-sensitive.
CartesianTooltipActionEventDetailCustomEvent.detail type: CartesianTooltipActionEventDetail. Event names are case-sensitive.
voidCustomEvent.detail type: void. Event names are case-sensitive.
voidCustomEvent.detail type: void. Event names are case-sensitive.
voidCustomEvent.detail type: void. Event names are case-sensitive.
{message:string}CustomEvent.detail type: {message:string}. Event names are case-sensitive.
Methods 44

Stencil methods return Promises. Use await within an async function to read the result.

Method / ArgumentsReturn typeDescription
point: Bar3DDatumPromise<void>An asynchronous method. Check the argument and return types below.
points: ReadonlyArray<Bar3DDatum>Promise<void>An asynchronous method. Check the argument and return types below.
points: ReadonlyArray<Bar3DDatum>Promise<void>An asynchronous method. Check the argument and return types below.
count: numberPromise<void>An asynchronous method. Check the argument and return types below.
count: numberPromise<void>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
points: ReadonlyArray<Bar3DDatum>Promise<void>An asynchronous method. Check the argument and return types below.
Promise<Bar3DStreamSource|undefined>An asynchronous method. Check the argument and return types below.
data: Bar3DDataPromise<void>An asynchronous method. Check the argument and return types below.
Promise<Bar3DDatum[]>An asynchronous method. Check the argument and return types below.
Promise<{ points: number; validPoints: number; missingCoordinates: number; invalidCoordinates: number; missingValues: number; zeroHeight: number; }>An asynchronous method. Check the argument and return types below.
Promise<Bar3DGeometry>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
options: {enabled?:boolean;duration?:number;easing?:Bar3DEasing;type?:HeatmapAnimationType}Promise<void>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<Scene3DCameraOptions>An asynchronous method. Check the argument and return types below.
options: Scene3DCameraOptionsPromise<void>An asynchronous method. Check the argument and return types below.
projection: Scene3DProjectionPromise<void>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
padding?: numberPromise<void>An asynchronous method. Check the argument and return types below.
factor: numberPromise<void>A factor below one moves closer. Perspective changes distance; orthographic changes zoom.
azimuth: number, polar?: numberPromise<void>An asynchronous method. Check the argument and return types below.
x: number, y: numberPromise<void>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<Bar3DRenderResult>An asynchronous method. Check the argument and return types below.
Promise<Bar3DEngineTier>An asynchronous method. Check the argument and return types below.
Promise<string|undefined>An asynchronous method. Check the argument and return types below.
Promise<ChartEngineStatus>Requested engine vs what runs, and why (CHART-ADD-08); a frozen or unlicensed chart reports the license outcome.
Promise<void>Without the grant (or while frozen) nothing is recycled: no GPU work starts.
cssX: number, cssY: numberPromise<Bar3DHitDetail|null>An asynchronous method. Check the argument and return types below.
index: numberPromise<Bar3DHitDetail|null>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<Bar3DSelection>An asynchronous method. Check the argument and return types below.
index: numberPromise<CartesianTooltipEventDetail|null>An asynchronous method. Check the argument and return types below.
index: numberPromise<CartesianTooltipEventDetail|null>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
index: numberPromise<boolean>An asynchronous method. Check the argument and return types below.
request: Bar3DCrosshairShowRequestPromise<boolean>Quiet source-category synchronization. Categories retain their original string or number type.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<ChartDataTable>An asynchronous method. Check the argument and return types below.
options?: CsvOptionsPromise<string>An asynchronous method. Check the argument and return types below.
Promise<string>An asynchronous method. Check the argument and return types below.