r: color,
            pointRadius: state.chartType === 'line' ? 3 : 0,
            tension: 0.25,
            fill: state.chartType === 'line',
            borderWidth: state.chartType === 'line' ? 2 : 1.5,
          });
        }
      }

      const options = {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: { labels: { color: textColor } },
          tooltip: { titleColor: textColor, bodyColor: textColor },
          canvasBg: { color: state.canvasBg },
