const currentDatapoint = scrawl.makeBlock({
name: name('dataframe'),
group,
mimic: name(`${selectedColumn}-${selectedRow}`),
useMimicDimensions: true,
useMimicStart: true,
useMimicHandle: true,
lockTo: 'mimic',
lineWidth: 6,
strokeStyle: 'yellow',
method: 'draw',
});
const updateSelected = () => {
const {yearLabels, categoryLabels, yearData} = currentData;
const category = categoryLabels[selectedRow],
year = yearLabels[selectedColumn],
data = yearData[year][selectedRow];
currentDatapoint.set({
mimic: name(`${year}-${category}`),
});
frame.updateSubtitle(`${category} in ${year}: §RED§${data.toLocaleString()}`);
};
updateSelected();