@manosim/react-minimal-pie-chart
Version:
Lightweight but versatile SVG pie/donut charts for React
28 lines (24 loc) • 606 B
JavaScript
import React from 'react';
import PropTypes from 'prop-types';
import { dataPropType } from './propTypes';
export default function ReactMinimalPieChartLabel({
data, // eslint-disable-line no-unused-vars
dataIndex, // eslint-disable-line no-unused-vars
color,
...props
}) {
return (
<text
textAnchor="middle"
alignmentBaseline="middle"
fill={color}
{...props}
/>
);
}
ReactMinimalPieChartLabel.displayName = 'ReactMinimalPieChartLabel';
ReactMinimalPieChartLabel.propTypes = {
data: dataPropType,
dataIndex: PropTypes.number,
color: PropTypes.string,
};