3D Surface.

PRO

Show gridded measurements as a continuous 3D surface.

Live preview34 feature examples

LIVE EXAMPLE

Measured surface

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 style4
Legend and interaction13
Title and dimensions3

Assign z heights to a regular X–Y grid. 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-surface-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-surface-3d",
      "props": {
        "data": {
          "x": [-2, -1, 0, 1, 2],
          "y": [-2, -1, 0, 1, 2],
          "z": [
            [0, 3, 4, 3, 0],
            [3, 6, 7, 6, 3],
            [4, 7, 8, 7, 4],
            [3, 6, 7, 6, 3],
            [0, 3, 4, 3, 0]
          ]
        },
        "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', 'surface-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

#

Explore a value across two coordinates, such as temperature, elevation, or a response surface.

Watch for perspective and occlusion. Change the camera angle and supplement precise values with data.

Data contract

PropertyInput format
dataA grid as { x, y, z }. z[row][column] is the height at x[column], y[row]. null creates a gap.

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.

Add to your interface

#

The code tabs below the preview contain the full data, options, event bindings, and responsive sizing for the current example. Copy them into an app project, such as Vite, that can resolve the installed packages.

Shared sy-chart API versus direct tags

API reference

#

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

Key properties

Attribute / PropertyType / DefaultDescription
Surface3DDataDefault: undefinedA grid as { x, y, z }. z[row][column] is the height at x[column], y[row]. null creates a gap.
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.
booleanDefault: falseSet as an HTML attribute or JavaScript property. type: boolean.
wireWidthnumberDefault: .8Set as an HTML attribute or JavaScript property. type: number.
wireColorstringDefault: '#475569'Set as an HTML attribute or JavaScript property. type: string.
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.
animationEasingSurface3DEasingDefault: 'ease-out'Allowed values: linear, ease-out, ease-in, ease-in-out. Default: 'ease-out'.
animationTypeHeatmapAnimationTypeDefault: undefinedAllowed values: initial, update. Default: undefined.
Other properties 19
Attribute / PropertyType / DefaultDescription
HeatmapColorInputDefault: 'viridis'Pass as a JavaScript property. type: HeatmapColorInput.
colorDomainSurface3DDomainDefault: undefinedPass as a JavaScript property. type: Surface3DDomain.
missingColorstringDefault: '#94a3b8'Set as an HTML attribute or JavaScript property. type: string.
surfaceSizeScene3DVectorDefault: [2,2,2]Pass as a JavaScript property. type: Scene3DVector.
stringDefault: 'en-US'Set as an HTML attribute or JavaScript property. type: string.
Surface3DAxesOptions|boolean|stringDefault: undefinedPass as a JavaScript property. type: Surface3DAxesOptions|boolean|string.
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:Surface3DHitDetail)=>stringDefault: undefinedPass as a JavaScript property. type: (detail:Surface3DHitDetail)=>string.
crosshairSnapDistancenumberDefault: 12Set as an HTML attribute or JavaScript property. type: number.
streamSourceSurface3DStreamSourceDefault: undefinedA stream source for live data. Check the contract for the specific type.
streamMaxnumberDefault: undefinedThe maximum number of streaming data points to retain.
Surface3DEngineModeDefault: 'auto'Renderer selection: auto, standard, or pro. Engine selection is separate from permission to use a Pro chart type.
Surface3DUnavailableBehaviourDefault: 'fallback'Allowed values: fallback, error. Default: 'fallback'.
Events 16
EventsDetail typeDescription
Surface3DRenderResult&{tier:Surface3DEngineTier}Emits rendering results in detail when chart drawing completes.
Surface3DHitDetailA point selection event. Read the selected data and index from CustomEvent.detail.
Surface3DHitDetail|nullCustomEvent.detail type: Surface3DHitDetail|null. Event names are case-sensitive.
Surface3DSelectionChangeEventDetailCustomEvent.detail type: Surface3DSelectionChangeEventDetail. Event names are case-sensitive.
ChartPointContextMenuEventDetail<Surface3DHitDetail>CustomEvent.detail type: ChartPointContextMenuEventDetail<Surface3DHitDetail>. Event names are case-sensitive.
Surface3DCameraChangeEventDetailCustomEvent.detail type: Surface3DCameraChangeEventDetail. Event names are case-sensitive.
Surface3DCrosshairDetail|nullCustomEvent.detail type: Surface3DCrosshairDetail|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
row: Surface3DRowInputPromise<void>An asynchronous method. Check the argument and return types below.
rows: ReadonlyArray<Surface3DRowInput>Promise<void>An asynchronous method. Check the argument and return types below.
rows: ReadonlyArray<Surface3DRowInput>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.
rows: ReadonlyArray<Surface3DRowInput>Promise<void>An asynchronous method. Check the argument and return types below.
Promise<Surface3DStreamSource|undefined>An asynchronous method. Check the argument and return types below.
data: Surface3DDataPromise<void>An asynchronous method. Check the argument and return types below.
Promise<Surface3DGrid>An asynchronous method. Check the argument and return types below.
Promise<{ missingHeights: number; invalidHeights: number; missingValues: number; invalidValues: number; }>An asynchronous method. Check the argument and return types below.
Promise<Surface3DGeometry>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?:Surface3DEasing;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<Surface3DRenderResult>An asynchronous method. Check the argument and return types below.
Promise<Surface3DEngineTier>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<Surface3DHitDetail|null>An asynchronous method. Check the argument and return types below.
row: number, column: numberPromise<Surface3DHitDetail|null>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<Surface3DSelection>An asynchronous method. Check the argument and return types below.
row: number, column: 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.
row: number, column: numberPromise<boolean>An asynchronous method. Check the argument and return types below.
request: CartesianCrosshairShowRequestPromise<boolean>Quiet cross-chart synchronization in data units, including positions between grid samples.
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.