Skip to content

Commit

Permalink
update sizelimit
Browse files Browse the repository at this point in the history
  • Loading branch information
illetid committed Aug 29, 2024
1 parent 8ce7003 commit ea8a044
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,12 @@ export default [
limit: '2.00 KB',
brotli: true,
},
{
name: 'Plugin: Series Markers',
path: 'dist/lightweight-charts.production.mjs',
import: '{ createSeriesMarkersPrimitive }',
ignore: ['fancy-canvas'],
limit: '3.00 KB',
brotli: true,
},
];
7 changes: 0 additions & 7 deletions src/plugins/series-markers/options.ts

This file was deleted.

26 changes: 26 additions & 0 deletions src/plugins/series-markers/primitive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,32 @@ class SeriesMarkersPrimitive<HorzScaleItem> implements ISeriesPrimitive<HorzScal
}
}

/**
* A function to create a series markers primitive.
*
* @example
* ```js
* import { createSeriesMarkersPrimitive } from 'lightweight-charts';
*
* const seriesMarkersPrimitive = createSeriesMarkersPrimitive(
* series,
* chart,
* [
* {
* color: 'green',
* position: 'inBar',
* shape: 'arrowDown',
* time: 1556880900,
* },
* ]
* );
* // and then you can modify the markers
* // set it to empty array to remove all markers
* seriesMarkersPrimitive.setMarkers([]);
*
* // or you can call `seriesMarkersPrimitive.markers()` to get the current markers
* ```
*/
export function createSeriesMarkersPrimitive<HorzScaleItem>(
series: ISeriesApi<SeriesType, HorzScaleItem>,
chart: IChartApiBase<HorzScaleItem>,
Expand Down

0 comments on commit ea8a044

Please sign in to comment.