Skip to content

DirectionalLineConfig

A directional line config allows separate line styling for upward, downward, and flat movements.

Example

ts
{
  up: {
    color: '#10b981',
    width: 1,
    style: 'solid'
  },
  down: {
    color: '#ef4444',
    width: 1,
    style: 'solid'
  },
  flat: {
    color: '#10b981',
    width: 1,
    style: 'solid'
  }
}

Properties

up

  • Type: LineConfig
  • Default: { color: '#10b981', style: 'solid', width: 1, dashes: [5, 5], endDotSize: 0 }

Line configuration applied when the value is moving upward.

down

  • Type: LineConfig
  • Default: { color: '#ef4444', style: 'solid', width: 1, dashes: [5, 5], endDotSize: 0 }

Line configuration applied when the value is moving downward.

flat

  • Type: LineConfig
  • Default: { color: '#10b981', style: 'solid', width: 1, dashes: [5, 5], endDotSize: 0 }

Line configuration applied when the value is unchanged (flat).

TypeScript

ts
interface DirectionalLineConfig {
  up?: LineConfig;
  down?: LineConfig;
  flat?: LineConfig;
}

React Candlesticks is available on npm and GitHub under the MIT License.