Unlike SolidEChartEventHandler which fires only when the pointer
is over a data graphic element, surface handlers fire everywhere on the
rendering surface. Use event.target to check whether the pointer was
over a graphic element or blank space:
const handleSurfaceClick: SolidEChartSurfaceHandler = (event) => {
if (!event.target) {
// Clicked on blank area - no graphic element under the pointer
}
};
The offsetX and offsetY fields carry canvas-relative coordinates,
useful for custom tooltip positioning, overlay drawing, or hit testing.
Event handler for chart surface events - events that fire anywhere on the chart canvas or SVG surface, including blank areas with no data elements.