Change Axis/Series Data Limitation
Introduction
This article explains how to change default data limitation of X and Y axis for scatter charts.
When there are too many categories in the X/Y axis or too many series, Sisense limits the number of categories/series to display.
Steps
Step 1 - Create widget
Create a scatter chart widget
Step 2 - Add script
Add the following script to the widget by editing the widget script:
widget.on('beforequery', function(w,args){
w.style.dataLimits.categoriesCapacityX = 80;// Or any other number
w.style.dataLimits.categoriesCapacityY = 80; // Or any other number
w.style.dataLimits.seriesCapacity = 100; // Or any other number
});
For example:
Given the following widget:
After adding the following script to the widget:
widget.on('beforequery', function(w,args){
w.style.dataLimits.seriesCapacity = 190;
});
We will get the following result:
Notes
Too many series/categories can cause :
- Performance issues
- UI issues such as: labels are too small, markers are drown on top of other markers...
-
Shani - works great on Scatter charts, but does not resolve the "Too many ticks" issue on Bar charts. See screen shot attached. Do you have one for that? Thanks, Jim
Sisense-Too Many Ticks error.png -
Shani,
Added it. Script is now:
widget.on('beforequery', function(w,args){
w.style.dataLimits.categoriesCapacityX = 5000;// Or any other number
w.style.dataLimits.categoriesCapacityY = 5000; // Or any other number
w.style.dataLimits.seriesCapacity = 5000; // Or any other number
w.style.dataLimits.categoriesCapacity = 5000;
});Unfortunately it did not resolve the issue. Note that this issue occurs on drill. Wouldn't have thought that matters, but wanted to mention.
Regards, Jim
Please sign in to leave a comment.
Comments
6 comments