I have this javascript code:
var data = CreateData(params);
var chart = new ej.charts.Chart({
primaryXAxis: {
title: 'Ocurrencia Temporal',
valueType: 'Category',
enableTrim: false
},
primaryYAxis: {
title: 'Impacto (%)',
minimum: 0,
maximum: 100,
interval: 10,
minorTickLines: { width: 0 },
majorTickLines: { width: 0 },
crossesAt: 0,
minorTicksPerInterval: 3
},
width: ej.base.Browser.isDevice ? '100%' : '100%',
series: [
{
type: 'Bubble',
dataSource: data,
minRadius: 0,
maxRadius: ej.base.Browser.isDevice ? 8 : 10,
xName: 'x',
yName: 'y',
size: 'size',
opacity: 0.6,
marker: {
dataLabel:
{
name: 'text'
}
}
},
],
pointRender: labelRender,
title: 'Calendario Estratégico Regulación',
tooltip: {
enable: true,
header: '<b>${point.text}</b>',
format: 'Impacto: <b>${point.y}%</b>' +
'<br />Estimacion Económica: <b>${point.valor}(MUSD)</b>' +
'<br />Ocurrencia Temporal: <b>${point.x}</b>'
},
legendSettings: { visible: true }
});
how can I add a custom value named "valor", this part of code
'<br />Estimacion Económica: <b>${point.valor}(MUSD)</b>' +
render literally as ${point.valor}(MUSD)
Im building my data source object like this
function CreateData(parameters) {
var data = *** this part get data from backend by para***
var arr = new Array();
for (i = 0; i < data.result.length; i++) {
var _form = new Object();
var customValue = data.result[i].CustomValue;
_form.TaskID = data.result[i].Id;
_form.text = data.result[i].Evento + " - " + data.result[i].Name;
_form.Pound = data.result[i].Evento;
_form.x = impactos.filter(x => x.Id == data.result[i].ImpactoId).map(x => x.Name)[0];
_form.y = data.result[i].ProbabilidadValor;
_form.size = Valor;
_form.valor = customValue; // i want to print this value
arr.push(_form);
}
return arr;
}
please help me :C