Knowledge Base Article

Create Data Points In A Column Chart

Introduction

Using line markers can be a great way to compare data whether it be over time or across a category. However, creating a marker requires using the Javascript API to hide the line. The steps below outline how to remove the line from a series.

Implementation

Step 1: Create a line chart, create two measures and set one as a column and the other as a line. Once complete, apply the changes, then reopen the chart editor.
Step 2: Open the widget script editor and add the following script.
widget.on('render', function(sender,se){
                var series00 = sender.queryResult.series[1];
                series00.lineWidth=0;
});
The number in the bracket reflects which measure it is, the first measure is 0, the second is 1, the third is 2, and so on. Specify the proper series. In the case above, the line is the past year profit (series 1)
 
Step 3: Save the script and refresh the widget!
Updated 03-02-2023
No CommentsBe the first to comment