
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@muil/charts
Advanced tools
Easily add charts to your emails.
Visit Muil Docs.
npm install @muil/charts
or
yarn add @muil/charts
import {BarChart} from '@muil/charts'
<BarChart
height={200}
legend={false}
categories={[{ color: '#17a2b8' }]}
series={[
{
label: '2017',
value: 53,
},
{
label: '2018',
value: 13,
},
{
label: '2019',
value: 26,
},
{
label: '2020',
value: 43,
},
]}
/>
import {BarChart} from '@muil/charts'
<BarChart
height={300}
legend
categories={[
{ label: 'One Week', color: '#17a2b8' },
{ label: '2 Weeks', color: '#d5d5d4' },
{ label: 'One Month', color: '#90ED7D' }
]}
series={[
{
label: 'Rick & Morty',
data: [53, 31, 25],
},
{
label: 'BoJack Horseman',
data: [13, 25, 94],
},
{
label: '100 Humans',
data: [26, 56, 37],
},
]}
/>
Property | Type | Description |
---|---|---|
height | Number | height of chart |
className | String | class name |
series | Array of Objects {label: String, value: Number, data: Array(Number)} | label under bar, value - for single percentage, data - for multiple percentages |
categories | Array of Objects {label: String, color: String} | label for legend, color of bar |
legend | Boolean | show or hide legend |
import {HorizontalBarChart} from '@muil/charts'
<HorizontalBarChart
maxWidth={400}
legend={false}
categories={[{ color: '#17a2b8' }]}
series={[
{
label: '2017',
value: 50,
},
{
label: '2018',
value: 30,
},
{
label: '2019',
value: 20,
},
{
label: '2020',
value: 2,
},
]}
/>
import {HorizontalBarChart} from '@muil/charts'
<HorizontalBarChart
maxWidth={400}
legend
categories={[
{ label: 'One Week', color: '#17a2b8' },
{ label: '2 Weeks', color: '#d5d5d4' },
{ label: 'One Month', color: '#90ED7D' }
]}
series={[
{
label: 'Rick & Morty',
data: [53, 31, 25],
},
{
label: 'BoJack Horseman',
data: [13, 25, 94],
},
{
label: '100 Humans',
data: [26, 56, 37],
},
]}
/>
Property | Type | Description |
---|---|---|
maxWidth | Number | max width of chart |
className | String | class name |
series | Array of Objects {label: String, value: Number, data: Array(Number)} | label under bar, value - for single percentage, data - for multiple percentages |
categories | Array of Objects {label: String, color: String} | label for legend, color of bar |
legend | Boolean | show or hide legend |
import {Calendar} from '@muil/charts'
<Calendar showNumbers />
import {Calendar} from '@muil/charts'
<Calendar
monthsBefore={1}
monthsAfter={1}
dayClassName={({ day }) => `score${day % 4}`}
/>
Property | Type | Description |
---|---|---|
className | String | class name |
monthsBefore | Number | number of months before current month |
monthsAfter | Number | number of months after current month |
showNumbers | Boolean | show or hide day numbers |
dayClassName | Function ({day: Number, date: Date}) | return class name for each day |
import {LineBar} from '@muil/charts'
<LineBar
percents={[
{ value: 10, color: '#17a2b8' },
{ value: 20, color: '#d5d5d4' },
{ value: 70, color: '#90ED7D' },
]}
/>
Property | Type | Description |
---|---|---|
className | String | class name |
percents | Array of Objects {value: Number, color: String} | value - percentage, color - color of bar |
FAQs
Easily add charts to your emails.
The npm package @muil/charts receives a total of 1 weekly downloads. As such, @muil/charts popularity was classified as not popular.
We found that @muil/charts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.