mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-10-04 17:04:53 +02:00
fix imports js
This commit is contained in:
parent
ada9fa4029
commit
f785e67f49
6 changed files with 163 additions and 42 deletions
|
@ -260,20 +260,9 @@
|
|||
{
|
||||
label: 'Villes',
|
||||
data: bubbleChartData,
|
||||
backgroundColor: bubbleChartData.map(d => `rgba(255, 99, 132, ${d.completion / 100})`),
|
||||
borderColor: 'rgba(255, 99, 132, 1)',
|
||||
},
|
||||
// regressionLine ? {
|
||||
// label: 'Régression linéaire',
|
||||
// type: 'line',
|
||||
// data: regressionLine,
|
||||
// borderColor: 'rgba(0, 0, 0, 0.7)',
|
||||
// borderWidth: 2,
|
||||
// pointRadius: 0,
|
||||
// fill: false,
|
||||
// order: 0,
|
||||
// tension: 0
|
||||
// } : null
|
||||
backgroundColor: bubbleChartData.map(d => `rgba(75, 192, 192, ${d.completion / 100})`),
|
||||
borderColor: 'rgba(75, 192, 192, 1)',
|
||||
},
|
||||
].filter(Boolean)
|
||||
},
|
||||
options: {
|
||||
|
@ -284,7 +273,8 @@
|
|||
align: 'center',
|
||||
color: '#000',
|
||||
font: {
|
||||
weight: 'bold'
|
||||
weight: '400',
|
||||
size: "10px",
|
||||
},
|
||||
formatter: (value, context) => {
|
||||
return context.dataset.data[context.dataIndex].label;
|
||||
|
@ -303,7 +293,7 @@
|
|||
return [
|
||||
`${d.label}`,
|
||||
`Population: ${d.x.toLocaleString()}`,
|
||||
`Lieux / 1000 hab: ${d.y.toFixed(2)}`,
|
||||
`Lieux / hab: ${d.y.toFixed(2)}`,
|
||||
`Total lieux: ${Math.round(Math.pow(d.r / 2, 2))}`,
|
||||
`Complétion: ${d.completion}%`
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue