# line-chart ## Описание пропсов | Пропс | Тип | Значение по умолчанию | Комментарий | |-------|-----|-----------------------|-------------| | `dataLineChart` | `Object` | `() => {` | нет комментария | | `period` | `Object` | `() => {` | нет комментария | | `filter` | `String` | `'d'` | нет комментария | ## Описание переменных | Переменная | Значение | Описание | |------------|----------|----------| | `baseunic` |
unicperson(fullper.value.filter(e|
=> new Date(e.visitdate)
>moment(new
Date(date)).subtract(between.value*2,
'd') && new Date(e.visitdate)
<= moment(new
Date(date)).subtract(between.value,
'd')))
let crrunic =
unicperson(fullper.value.filter(e
=> new Date(e.visitdate)
>moment(new
Date(date)).subtract(between.value,
'd') && new Date(e.visitdate)
<= new Date(date)))
let bothuser = new
Set([...baseunic].filter(element
=> crrunic.has(element)))
if (date
==formatDash(filterStore.date_period.enddate))
{
editCRR(bothuser.size*100/baseunic.size)
}
return baseunic.size
==0?0:bothuser.size*100/baseunic.size
}
const editCRR = (val) =>
{
emit('getCRR', val)
}
const unicperson = (arr)
=> {
let arrnew =[]
arr.forEach(e =>
arrnew.push(...e.user) )
return new Set(arrnew)
}
const data=computed({get()
{
return
JSON.parse(JSON.stringify(dataf.value))
}
})
const linear=ref(null)
const options = {
plugins: {
datalabels: {
color: 'grey',
align: 'top',
display:
'auto'
},
legend: {
onHover:
(event, chartElement) => {
event.native.target.style.cursor
='pointer'
Расчет значения crr, и передача в| ## Пример использования ```vue import line-chart from '@/components/components\UI\aboutportal\line-chart'; ``` ```vue
родительский компонент значения, на
последнюю дату в периоде для
компонента card-total
@constructor
@param {object} date - по
каждому дню, в указанном периоде
(пример - 2024-03-22)
@description Для расчетного
периода с 04