import React from "react";
export const TextOnly = ({ attributes, chartData, chartElementClassName, chartElementId, }) => {
    const { textOnlyDecimalPlaces = 1, textOnlyPrefix = "", textOnlySuffix = "" } = attributes;
    // Round based on number of decimal places to show
    const precision = 10 ** textOnlyDecimalPlaces;
    const value = Math.round(chartData.result[0] * precision) / precision;
    const textContent = chartData.result.length === 0 ? "" : textOnlyPrefix + value + textOnlySuffix;
    return (React.createElement("div", { id: chartElementId, className: chartElementClassName }, textContent));
};
//# sourceMappingURL=text-only.js.map