Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 13 additions & 3 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const path = require('path');
const fs = require('fs');
// ESM import workaround for CJS modules
const remarkGfm = require('remark-gfm').default;

const {
loadWorkspaceAddon,
Expand All @@ -17,11 +19,19 @@ const previewHeadTemplate = fs.readFileSync(path.resolve(__dirname, 'preview-hea
module.exports = /** @type {import('./types').StorybookConfig} */ ({
stories: [],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-a11y',
{
name: '@storybook/addon-docs',
options: {
mdxPluginOptions: {
mdxCompileOptions: {
// Enable GitHub Flavored Markdown support in MDX files
remarkPlugins: [remarkGfm],
},
},
},
},
'@storybook/addon-links',
// https://storybook.js.org/docs/writing-docs/mdx#markdown-tables-arent-rendering-correctly
'@storybook/addon-mdx-gfm',

// internal monorepo custom addons
/** {@link file://./../packages/react-components/react-storybook-addon/package.json} */
Expand Down
2 changes: 1 addition & 1 deletion apps/chart-docsite/.storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addons } from '@storybook/manager-api';
import { addons } from 'storybook/manager-api';

import fluentStorybookTheme from './theme';

Expand Down
2 changes: 1 addition & 1 deletion apps/chart-docsite/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Preview } from '@storybook/react';
import type { Preview } from '@storybook/react-webpack5';

import * as rootPreview from '../../../.storybook/preview';

Expand Down
2 changes: 1 addition & 1 deletion apps/chart-docsite/.storybook/theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { create } from '@storybook/theming';
import { create } from 'storybook/theming';

import logo from '../public/fluentui-logo.svg';

Expand Down
171 changes: 24 additions & 147 deletions apps/chart-docsite/src/Introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/addon-docs';
import { Meta } from '@storybook/addon-docs/blocks';

<Meta title="Introduction" />

Expand All @@ -18,152 +18,29 @@ To get started with the charts package in your project:
npm install @fluentui/react-charts
```

or

```
yarn add @fluentui/react-charts
```

2. Import and use the charts in your React application.

3. Refer to the individual chart examples for detailed usage instructions and examples.

## Available charts across platforms

<table>
<tr>
<th>Chart</th>
<th>Fluent v8</th>
<th>Fluent v9</th>
<th>Fluent Web Component</th>
</tr>
<tr>
<td>Documentation</td>
<td>[Link](https://aka.ms/fluentcharting)</td>
<td>[Link](https://react.fluentui.dev/?path=/docs/charts_introduction--docs)</td>
<td>[Link](https://github.com/microsoft/fluentui/tree/master/packages/charts/chart-web-components#readme)</td>
</tr>
<tr>
<td>AreaChart</td>
<td>Stable</td>
<td>Stable</td>
<td>Planned</td>
</tr>
<tr>
<td>DonutChart</td>
<td>Stable</td>
<td>Stable</td>
<td>Stable</td>
</tr>
<tr>
<td>GaugeChart</td>
<td>Stable</td>
<td>Stable</td>
<td>Planned</td>
</tr>
<tr>
<td>HeatMapChart</td>
<td>Stable</td>
<td>Stable</td>
<td>Planned</td>
</tr>
<tr>
<td>HorizontalBarChart</td>
<td>Stable</td>
<td>Stable</td>
<td>Stable</td>
</tr>
<tr>
<td>HorizontalBarChart with Axis</td>
<td>Stable</td>
<td>Stable</td>
<td>Planned</td>
</tr>
<tr>
<td>HorizontalBarChart Stacked</td>
<td>Stable</td>
<td>HorizontalBarChart</td>
<td>HorizontalBarChart</td>
</tr>
<tr>
<td>HorizontalBarChart MultiStacked</td>
<td>Stable</td>
<td>HorizontalBarChart</td>
<td>HorizontalBarChart</td>
</tr>
<tr>
<td>Legends</td>
<td>Stable</td>
<td>Stable</td>
<td>Planned</td>
</tr>
<tr>
<td>LineChart</td>
<td>Stable</td>
<td>Stable</td>
<td>Planned</td>
</tr>
<tr>
<td>PieChart</td>
<td>Stable</td>
<td>Use donut chart</td>
<td>Use donut chart</td>
</tr>
<tr>
<td>SankeyChart</td>
<td>Stable</td>
<td>Stable</td>
<td>Planned</td>
</tr>
<tr>
<td>Sparkline</td>
<td>Stable</td>
<td>Stable</td>
<td>-</td>
</tr>
<tr>
<td>TreeChart</td>
<td>Stable</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>VerticalBarChart</td>
<td>Stable</td>
<td>Stable</td>
<td>Planned</td>
</tr>
<tr>
<td>VerticalBarChart Grouped</td>
<td>Stable</td>
<td>Stable</td>
<td>Planned</td>
</tr>
<tr>
<td>VerticalBarChart Stacked</td>
<td>Stable</td>
<td>Stable</td>
<td>Planned</td>
</tr>
<tr>
<td>Plotly Schema Chart (new)</td>
<td>Stable</td>
<td>Stable</td>
<td>-</td>
</tr>
<tr>
<td>Scatter Chart (new)</td>
<td>Stable</td>
<td>Stable</td>
<td>-</td>
</tr>
<tr>
<td>Gantt Chart (new)</td>
<td>June 2025</td>
<td>July 2025</td>
<td>-</td>
</tr>
</table>
| Chart | Fluent v8 | Fluent v9 | Fluent Web Component |
| ------------------------------- | ------------------------------------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| Documentation | [Link](https://aka.ms/fluentcharting) | [Link](https://react.fluentui.dev/?path=/docs/charts_introduction--docs) | [Link](https://github.com/microsoft/fluentui/tree/master/packages/charts/chart-web-components#readme) |
| AreaChart | Stable | Stable | Planned |
| DonutChart | Stable | Stable | Stable |
| GaugeChart | Stable | Stable | Planned |
| HeatMapChart | Stable | Stable | Planned |
| HorizontalBarChart | Stable | Stable | Stable |
| HorizontalBarChart with Axis | Stable | Stable | Planned |
| HorizontalBarChart Stacked | Stable | HorizontalBarChart | HorizontalBarChart |
| HorizontalBarChart MultiStacked | Stable | HorizontalBarChart | HorizontalBarChart |
| Legends | Stable | Stable | Planned |
| LineChart | Stable | Stable | Planned |
| PieChart | Stable | Use donut chart | Use donut chart |
| SankeyChart | Stable | Stable | Planned |
| Sparkline | Stable | Stable | - |
| TreeChart | Stable | - | - |
| VerticalBarChart | Stable | Stable | Planned |
| VerticalBarChart Grouped | Stable | Stable | Planned |
| VerticalBarChart Stacked | Stable | Stable | Planned |
| Plotly Schema Chart (new) | Stable | Stable | - |
| Scatter Chart (new) | Stable | Stable | - |
| Gantt Chart (new) | June 2025 | July 2025 | - |

## Using v8 charts in fluent v9

Expand Down
13 changes: 10 additions & 3 deletions apps/pr-deploy-site/just.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,22 @@ repoDeps.forEach(dep => {
*/
task('generate:js', () => {
const jsContent = fs.readFileSync(path.join(__dirname, './pr-deploy-site.js'), 'utf-8');
const placeholder = '/* __PACKAGES_LIST_PLACEHOLDER__ */';

if (!jsContent.includes('var packages;')) {
console.error('pr-deploy-site.js must contain a line "var packages;" to replace with the actual packages');
if (!jsContent.includes(placeholder)) {
console.error(`pr-deploy-site.js must contain the placeholder "${placeholder}"`);
process.exit(1);
}

fs.writeFileSync(
path.join('dist', 'pr-deploy-site.js'),
jsContent.replace('var packages;', `var packages = ${JSON.stringify([...deployedPackages])};`),
jsContent.replace(
placeholder,
JSON.stringify([...deployedPackages], null, 2)
// remove the surrounding array brackets
.slice(1, -1)
.trim(),
),
);
});

Expand Down
Loading
Loading