{"version":3,"file":"ActivityChart-DGQt7fwC.js","sources":["../../../app/javascript/components/Valuations/ActivityChart.tsx"],"sourcesContent":["import React, { memo } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Line } from '../../dashboards/components/common/chartjs-3';\n\ninterface IProps {\n data: number[];\n labels: string[];\n minHeight: string;\n isEmbeded?: boolean;\n}\n\nconst getChartOptions = (isEmbeded: boolean) => ({\n responsive: true,\n maintainAspectRatio: false,\n plugins: {\n legend: {\n display: false,\n },\n },\n scales: {\n yAxes: {\n title: {\n display: true,\n text: 'Activity Ratio',\n },\n beginAtZero: true,\n ticks: {\n callback: (value: number) => `${value}`,\n },\n display: true,\n min: 0,\n },\n xAxes: {\n ticks: {\n display: !isEmbeded,\n autoSkip: true,\n maxRotation: 0,\n minRotation: 0,\n },\n },\n },\n});\n\nconst getChartData = (labels: string[], data: number[]) => ({\n labels,\n datasets: [\n {\n label: 'Activity',\n fill: true,\n cubicInterpolationMode: 'linear',\n tension: 0.4,\n backgroundColor: 'rgba(30,102,37, 0.2)',\n borderColor: 'rgba(30,102,37, 1)',\n data,\n },\n ],\n});\n\nconst ActivityChart = (props: IProps) => {\n const { labels, data, minHeight, isEmbeded } = props;\n const chartData = getChartData(labels, data);\n const options = getChartOptions(isEmbeded);\n return (\n