Skip to content

Scatterpolargl

Overview

The scatterpolargl insight type is used to create scatter plots on polar coordinates using WebGL rendering. This allows high-performance plotting of large datasets in polar coordinates, ideal for scenarios with many data points.

You can customize marker size, color, and lines to connect points, similar to scatterpolar, but with WebGL's performance advantages.

Common Uses

  • Large Datasets in Polar Coordinates: Efficiently visualize many data points.
  • Performance Optimization: Use WebGL for fast rendering.
  • Circular Data with Directional Components: Ideal for cyclic data where radial distance and angle are key factors.

Check out the Attributes for the full set of configuration options

Examples

Common Configurations

sources:
  - name: scatterpolargl-data-source
    type: duckdb
    database: target/seeds/scatterpolargl_data.duckdb
    seeds:
      - table_name: model
        args:
          - echo
          - |
            theta,r
            0,10
            45,20
            90,30
            135,25
            180,15
models:
  - name: scatterpolargl-data
    source: ${ref(scatterpolargl-data-source)}
    sql: select * from model
insights:
  - name: Simple Scatterpolargl Insight
    props:
      type: scatterpolargl
      theta: ?{${ref(scatterpolargl-data).theta}}
      r: ?{${ref(scatterpolargl-data).r}}
      mode: "markers"
    interactions:
      - split: ?{ theta }
      - split: ?{ r }
charts:
  - name: Simple Scatterpolargl Chart
    insights:
      - ${ref(Simple Scatterpolargl Insight)}
    layout:
      title:
        text: Simple Scatterpolargl Plot<br><sub>High-Performance Polar Data Points</sub>
sources:
  - name: scatterpolargl-data-lines-source
    type: duckdb
    database: target/seeds/scatterpolargl_data_lines.duckdb
    seeds:
      - table_name: model
        args:
          - echo
          - |
            theta,r
            0,5
            45,15
            90,20
            135,10
            180,25
models:
  - name: scatterpolargl-data-lines
    source: ${ref(scatterpolargl-data-lines-source)}
    sql: select * from model
insights:
  - name: Scatterpolargl Insight with Lines
    props:
      type: scatterpolargl
      theta: ?{${ref(scatterpolargl-data-lines).theta}}
      r: ?{${ref(scatterpolargl-data-lines).r}}
      mode: "lines+markers"
    interactions:
      - split: ?{ theta }
      - split: ?{ r }
charts:
  - name: Scatterpolargl Chart with Lines
    insights:
      - ${ref(Scatterpolargl Insight with Lines)}
    layout:
      title:
        text: Scatterpolargl Plot with Lines<br><sub>Connecting Data Points with Lines in Polar Coordinates</sub>
sources:
  - name: scatterpolargl-data-custom-source
    type: duckdb
    database: target/seeds/scatterpolargl_data_custom.duckdb
    seeds:
      - table_name: model
        args:
          - echo
          - |
            theta,r,size,color
            0,5,10,#1f77b4
            45,15,15,#ff7f0e
            90,20,20,#2ca02c
            135,10,25,#d62728
            180,25,30,#9467bd
models:
  - name: scatterpolargl-data-custom
    source: ${ref(scatterpolargl-data-custom-source)}
    sql: select * from model
insights:
  - name: Scatterpolargl Insight with Custom Markers
    props:
      type: scatterpolargl
      theta: ?{${ref(scatterpolargl-data-custom).theta}}
      r: ?{${ref(scatterpolargl-data-custom).r}}
      mode: "markers"
      marker:
        size: ?{${ref(scatterpolargl-data-custom).size}}
        color: ?{${ref(scatterpolargl-data-custom).color}}
    interactions:
      - split: ?{ theta }
      - split: ?{ r }
      - split: ?{ color }
charts:
  - name: Scatterpolargl Chart with Custom Markers
    insights:
      - ${ref(Scatterpolargl Insight with Custom Markers)}
    layout:
      title:
        text: Scatterpolargl Plot with Custom Markers<br><sub>Custom Sizes and Colors for Polar Data Points</sub>