storybook/docs/snippets/vue/histogram-story.mdx-3.mdx
2022-11-17 16:33:22 +01:00

34 lines
773 B
Plaintext

```md
<!-- Histogram.stories.mdx -->
import { Canvas, Meta, Story } from '@storybook/addon-docs';
import Histogram from './Histogram.vue';
<Meta title="Histogram" component={Histogram} />
<!--
👇 Render functions are a framework specific feature to allow you control on how the component renders.
See https://storybook.js.org/docs/7.0/vue/api/csf
to learn how to use render functions.
-->
<Canvas>
<Story
name="Default"
args={{
dataType: 'latency',
showHistogramLabels: true,
histogramAccentColor: '#1EA7FD',
label: 'Latency distribution',
}}
render={(args) => ({
components: { Histogram },
setup() {
return { args };
},
template: '<Histogram v-bind="args" />',
})} />
</Canvas>
```