type Advanced Settings - nteract/semiotic GitHub Wiki

  • Custom Settings for ORFrame Types

As with other data visualization types in the various frames, ORFrame will let you send the following strings to type: "bar", "clusterbar", "swarm", "point". If you want more control over the data visualization being rendered, each of these types have additional settings you can adjust based on your use case and which typically expose settings associated with the data transformation method associated with the type. To do this, you need to send an object instead of a string, and that object should have a “type” attribute set to the string, so this uses swarm with the default method:

<ORFrame
   type={"swarm"}
/>

...while this sends custom settings to adjust the number of iterations:

<ORFrame
   type={{ type: "swarm", iterations: 50  }}
/>

Custom Settings by Type

Swarm Plot

  • iterations: The number of ticks for the d3-force forceSimulation. Defaults to 120.
  • strength: Strength of the pull toward the center of the column. Defaults to 2.
  • r: A number determining the size of each circle's radius or a function that takes a datapoint and returns a number setting the circle's radius. Defaults to a column size and data length dependent value between 2 and 5.

Point

  • r: A number determining the size of each circle's radius or a function that takes a datapoint and returns a number setting the circle's radius. Defaults to 3.

Bar

  • innerRadius: A value in pixels to determine the inner radius of a chart if in radial projection. Has no effect in horizontal or vertical.
  • offsetAngle: A value in degrees specifying an alternate origin for a chart in the radial projection. A value of 0 is at the top 12 o'clock position (this is the default), and the angles progress clockwise from there. For instance, offsetAngle: 90 results in a chart that progresses from 3 o'clock clockwise around for a full circle.
  • angleRange: An array [ startDegrees, endDegrees ] that specifies alternate start and end angles of a chart in the radial projection. A value of 0 is at the top 12 o'clock position and the angles progress clockwise from there. If you want to wrap around through the 12 o'clock position, specify a value greater than 360 for the end angle. For instance, angleRange: [ 270, 450 ] results in a chart that progresses from 9 o'clock to 3 o'clock.