PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.22
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.22
1.4.22 1.4.21 1.4.20 1.4.19 1.4.18 1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 All 185 releases
disco / backend / views / components / Analytics / components / dashboard / CustomTooltipByRevenueChart.jsx

CustomTooltipByRevenueChart.jsx in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.22, at backend/views/components/Analytics/components/dashboard/CustomTooltipByRevenueChart.jsx

21 lines 694 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { fmt, formatTooltipDate } from '@/lib/utils';
2
3 const CustomTooltipByRevenueChart = ({ active, payload, label, interval }) => {
4 if (!active || !payload?.length) return null;
5 return (
6 <div className="disco:bg-[#1e2327] disco:text-white disco:rounded-lg disco:p-2 disco:text-[10px] disco:shadow-lg">
7 <p className="disco:text-[#bbcfff] disco:mb-1">
8 {formatTooltipDate(label, interval)}
9 </p>
10 {payload.map((p) => (
11 <p key={p.name} style={{ color: p.color }}>
12 {p.name === 'net_sales' ? 'Net Sales' : 'Discount Sales'}:{' '}
13 <strong className="disco:text-white">{fmt(p.value)}</strong>
14 </p>
15 ))}
16 </div>
17 );
18 };
19
20 export default CustomTooltipByRevenueChart;
21