ECharts - "Execution Error: data is not defined"

I have dashboard using Apache EChart plugin and working fine.
When I upgraded the pluging to Business Charts, in same code I have the ERROR message: ReferenceError: data is not defined

let RAW_it = ,
FIN_it = ,
TOTAL_it = ,
WIP_it = ;
Transit_it = ;
Target_it = ;

const datablock = data.series.map((s) => {
const RAW_it = s.fields.find((f) => f.name === ‘RAW’).values.buffer || s.fields.find((f) => f.name === ‘RAW’).values;
const FIN_it = s.fields.find((f) => f.name === ‘FIN’).values.buffer || s.fields.find((f) => f.name === ‘FIN’).values;
const WIP_it = s.fields.find((f) => f.name === ‘WIP’).values.buffer || s.fields.find((f) => f.name === ‘WIP’).values;
const Transit_it = s.fields.find((f) => f.name === ‘transit’).values.buffer || s.fields.find((f) => f.name === ‘transit’).values;
const Target_it = s.fields.find((f) => f.name === ‘target’).values.buffer || s.fields.find((f) => f.name === ‘target’).values;
const PN = s.fields.find((f) => f.name === ‘d’).values.buffer || s.fields.find((f) => f.name === ‘d’).values;
const P2 = s.fields.find((f) => f.name === ‘d’).values.buffer || s.fields.find((f) => f.name === ‘d’).values;
return PN.map((d, i) => [d, RAW_it[i].toFixed(2), FIN_it[i].toFixed(2), WIP_it[i].toFixed(2), Transit_it[i].toFixed(2), ((RAW_it[i] + FIN_it[i] + WIP_it[i]) * 0), (RAW_it[i] + FIN_it[i] + WIP_it[i] + Transit_it[i]).toFixed(2), Target_it[i].toFixed(2), Target_it[i] - (RAW_it[i] + FIN_it[i] + WIP_it[i] + Transit_it[i])]);

})[0];

someone could support me to findout the issue.
I need same working with the pluging to Business Charts.