export function renderTemplate(data){
const hasTitle = (data.title !== undefined && data.title !== null && data.title !== ""),
hasDescription = (data.description !== undefined && data.description !== null && data.description !== "")
;
let chartVizGroup = `
`,
svgElmt = `
`
;
if (hasTitle || hasDescription) {
const labelArray = [],
elementArray = []
;
if (hasTitle) {
const titleId = `${data.id}-title`;
labelArray.push(titleId);
elementArray.push(`
${data.title}`);
}
if (hasDescription) {
const descriptionId = `${data.id}-desc`;
labelArray.push(descriptionId);
elementArray.push(`
${data.description}`);
}
svgElmt = `
`;
}
if (data.isFocusable){
chartVizGroup = `
`;
}
chartVizGroup = chartVizGroup + `
${svgElmt}
`;
return `
`;
}