3D Surface Chart Visualization with LightningChart and RequireJS

Oct 2, 2025, 5:35 PM

Please output this HTML+JS:

Please execute the HTML using HTML()

3-D surface demo embedded

The interactive LightningChart JS surface is now rendered below the notebook cell. You can rotate, zoom, and inspect the dataset right in the notebook.
Feel free to explore the plot and let me know if you’d like to:
  • change the theme or color palette,
  • load your own surface data,
  • or extract numerical insights from the underlying dataset.

Please execute the following JS:

/*
  • LightningChartJS example that showcases visualization of XY scatter chart with confidence ellipse.
    */
    // Import LightningChartJS
    const lcjs = require('@lightningchart/lcjs')
// Extract required parts from LightningChartJS.
const { lightningChart, PointShape, ColorCSS, SolidLine, SolidFill, emptyLine, Themes } = lcjs
// Create chart and series.
const chart = lightningChart()
.ChartXY({
legend: { visible: false },
theme: Themes.darkGold,
})
.setTitle('Scatter chart + confidence Ellipse')
// Create point series for visualizing scatter points.
const pointSeries = chart.addPointSeries().setPointShape(PointShape.Circle).setPointSize(3).setName('Scatter series')
// Visualize confidence ellipse with polygon series.
// Note, routine for calculation of confidence ellipse coordinates from scatter data set is not currently included in LightningChart JS!
const polygonSeries = chart.addPolygonSeries().setCursorEnabled(false).setPointerEvents(false)
// Fetch example data from JSON asset.
fetch(
new URL(document.head.baseURI).origin + new URL(document.head.baseURI).pathname + 'examples/assets/0015/data-confidenceEllipseXY.json',
)
.then((r) => r.json())
.then((data) => {
const { scatterPoints, confidenceEllipsePolygonCoords } = data
    // Add data to series.
    pointSeries.appendJSON(scatterPoints)
    polygonSeries
        .add(confidenceEllipsePolygonCoords)
        .setFillStyle(new SolidFill({ color: ColorCSS('gray').setA(30) }))
        .setStrokeStyle(
            new SolidLine({
                thickness: 1,
                fillStyle: new SolidFill({ color: ColorCSS('white') }),
            }),
        )
})
Get started with Vizly