Skip to content
commit-766c8d6756a1

Interactive line 3D

Ordered paths through three measures when overall trajectory matters more than individual coordinates.

Purpose
Trace one ordered path through three quantitative dimensions.
Use when
Path shape matters more than precise point-by-point comparison.
Avoid when
Readers need exact coordinates or cannot use a rotatable view.
Equivalent data
The formula, domains, and CSV provide a non-visual equivalent; reduced motion keeps the view still.

Exact line data

Formula: t = i / 1000; x = (1 + 0.25 × cos(75 × t)) × cos(t); y = (1 + 0.25 × cos(75 × t)) × sin(t); z = t + 2 × sin(75 × t), with i from 0 through 24999

25000 ordered points. t domain [0, 24.999]; X domain [-1.2489045114273476, 1.25]; Y domain [-1.2497258288146875, 1.2497201051428937]; Z domain [-1.9368409642920035, 26.985899643193864].

View remains stationary; initial drawing may animate. Reduced-motion preference disables animation.

Download all exact points as CSV

Exact line data

Formula: t = i / 1000; x = (1 + 0.25 × cos(75 × t)) × cos(t); y = (1 + 0.25 × cos(75 × t)) × sin(t); z = t + 2 × sin(75 × t), with i from 0 through 24999

25000 ordered points. t domain [0, 24.999]; X domain [-1.2489045114273476, 1.25]; Y domain [-1.2497258288146875, 1.2497201051428937]; Z domain [-1.9368409642920035, 26.985899643193864].

View rotates automatically and initial drawing may animate. Reduced-motion preference disables animation and keeps the same chart stationary.

Download all exact points as CSV
Usage Example
@interactive.Line3D(interactive.Line3DConfig{
  Label: "basic line3d example",
  Series: []interactive.Line3DSeries{{
    Name: "line3D",
    Points: points,
  }},
  VisualRange: &interactive.Line3DVisualRange{
    Max: 30,
    Calculable: interactive.Bool(true),
  },
  Grid: interactive.Line3DGrid{
    View: &interactive.Line3DView{AutoRotate: interactive.Bool(false)},
  },
  DataSummary: interactive.Line3DDataSummary{
    Formula: "t = i / 1000; x = ...; y = ...; z = ...",
    Parameter: "t", ParameterMin: 0, ParameterMax: 24.999,
  },
})

Motion

Auto-rotation is optional exploration. The stationary treatment remains available, including for reduced-motion preferences.

Go API

v0.0.1

The examples above cover behavior and composition. pkg.go.dev is the canonical reference for exported types, functions, methods, and Go documentation.

github.com/araihu/goshtoso-charts/components/interactive

Enabled, disabled, hidden, and omitted wrapper behavior, controls, export, and client transitions are shared by every chart. Review chart controls, then compare static/vector and interactive capabilities.

Open v0.0.1 API