Skip to content

Instantly share code, notes, and snippets.

import { useState } from 'react';
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd';
const options = [
{ value: 'jack', label: 'Jack' },
{ value: 'lucy', label: 'Lucy' },
{ value: 'Yiminghe', label: 'yiminghe' },
{ value: 'disabled', label: 'Disabled', disabled: true },
];
import { useState } from 'react';
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd';
const options = [
{ value: 'jack', label: 'Jack' },
{ value: 'lucy', label: 'Lucy' },
{ value: 'Yiminghe', label: 'yiminghe' },
{ value: 'disabled', label: 'Disabled', disabled: true },
];
import { useState } from 'react';
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd';
const options = [
{ value: 'jack', label: 'Jack' },
{ value: 'lucy', label: 'Lucy' },
{ value: 'Yiminghe', label: 'yiminghe' },
{ value: 'disabled', label: 'Disabled', disabled: true },
];
import { useState } from 'react';
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd';
const options = [
{ value: 'jack', label: 'Jack' },
{ value: 'lucy', label: 'Lucy' },
{ value: 'Yiminghe', label: 'yiminghe' },
{ value: 'disabled', label: 'Disabled', disabled: true },
];
import { useState } from 'react';
import { Button, ConfigProvider, Space, Select, Switch, theme } from 'antd';
const options = [
{ value: 'jack', label: 'Jack' },
{ value: 'lucy', label: 'Lucy' },
{ value: 'Yiminghe', label: 'yiminghe' },
{ value: 'disabled', label: 'Disabled', disabled: true },
];
import { Button, ConfigProvider, Space, Select, theme } from 'antd';
const options = [
{ value: 'jack', label: 'Jack' },
{ value: 'lucy', label: 'Lucy' },
{ value: 'Yiminghe', label: 'yiminghe' },
{ value: 'disabled', label: 'Disabled', disabled: true },
];
function App() {
import { Button, Space, Select } from 'antd';
const options = [
{ value: 'jack', label: 'Jack' },
{ value: 'lucy', label: 'Lucy' },
{ value: 'Yiminghe', label: 'yiminghe' },
{ value: 'disabled', label: 'Disabled', disabled: true },
];
function App() {
import Plot from 'react-plotly.js';
const layoutObj = {
title: 'Color Dimensions',
width: 800,
height: 600,
legend: {
orientation: 'h',
},
dragmode: 'select',
import Plot from 'react-plotly.js';
const layoutObj = {
title: 'Color Dimensions',
width: 800,
height: 600,
legend: {
orientation: 'h',
},
};
import Plot from 'react-plotly.js';
const layoutObj = {
title: 'Color Dimensions',
width: 800,
height: 600,
};
const dataArray = [
{ // trace 0