Skip to content

Function: addHline() ​

ts
function addHline(chart, y, options?): Promise<Chart>;

Add a horizontal line at y across the subplot (plotly.py add_hline).

Parameters ​

ParameterType
chartChart
yunknown
optionsShapeOptions

Returns ​

Promise<Chart>

Example ​

ts
await addHline(chart, 50, { line: { dash: 'dash', color: 'red' }, label: { text: 'target' } });

Released under the MIT License.