Skip to content

Commit

Permalink
docs: add jsdocs to props
Browse files Browse the repository at this point in the history
  • Loading branch information
cshaa committed Aug 1, 2024
1 parent d4afe30 commit 7ba020f
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions src/lib/Plot.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,53 @@
};
const dispatch = createEventDispatcher<$$Events>();
// bind props
//
// Bind Props
/** The HTML element wrapping the plot. */
export let element: HTMLDivElement | undefined = undefined;
/** The inner HTML element containing the plot. */
export let plot: PlotlyHTMLElement | undefined = undefined;
// input props
//
// Input Props
/**
* Alternative Plotly bundle to use. If `undefined`, it defaults to
* the `plotly.js-dist` package; if null, no plot will be drawn and
* no library will be downloaded.
*/
export let libPlotly: typeof import('plotly.js-dist') | null | undefined = undefined;
/**
* Array of trace data, see https://plot.ly/javascript/reference/
*/
export let data: Data[];
/**
* Layout of the plot, see https://plot.ly/javascript/reference/#layout
*/
export let layout: Partial<Layout> | undefined = undefined;
/**
* Configuration, see https://plot.ly/javascript/configuration-options/
*/
export let config: Partial<Config> | undefined = undefined;
/**
* Automatically resize the plot to fill the width and/or
* height of its parent element.
*/
export let fillParent: FillParent = false;
/**
* Debounce all changes to the plot.
*/
export let debounce: number | DebounceOptions = 0;
/**
* Class attribute that will be passed to the HTML element
* wrapping the plot
*/
let className = '';
export { className as class };
Expand Down

0 comments on commit 7ba020f

Please sign in to comment.