You must be logged in to post your query.
Home › Forums › Chart Support › chart tooltip: hide undefined
Tagged: tooltip
Hi,
I’m looking to hide undefined sections in my tooltips.
Since one of the categories is an unique serial number, and not all products have one, I have many undefined values.
I was wondering what code should I input. I currently have:
toolTip: { animationEnabled: false, backgroundColor: "white", var label = ""; var content = " "; for (var i = 0; i < e.entries.length; i++) { content += "x:" + e.entries[i].dataPoint.x + "VP" + e.entries[i].dataPoint.y + " " + e.entries[i].dataPoint.serial_number; }
@pancakestacks,
You can add a condition to check if the category serial_number is present in toolTip contentFormatter. Please take a look at this jsfiddle.
serial_number
__ Priyanka M S Team CanvasJS
You must be logged in to reply to this topic. Login/Register