cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member

Introduction

By default, Sisense sorts a line chart in ascending order. The only other way to order the line chart is by the values in the series being plotted. The code in this article will enable you to reverse the chart order.
 

Implementation

The code for this functionality is attached to the post and embedded in this article. You'll implement the code as a widget script. There's more information on adding widget scripts here: https://sisense.dev/guides/customJs/extensions/
Paste the following code into your widget's script editor:
widget.on("processresult",function(w,args){
 for (i=0;i<args.result.series.length;i++) {
  args.result.series[i].data.reverse();
 };
 args.result.xAxis.categories.reverse();
})
Version history
Last update:
‎02-16-2024 10:04 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: