Custom sort for Bar and Column Chart
Custom sort for Bar and Column Chart Question: I have seen several posts of people asking if there is a simple way to apply custom sorts for car and column charts, and until recently, I have been using the community customBarColumnChart Plugin, which is not supported anymore, and also not working correctly in the latest version of Sisense cloud. Not sure why this cannot become a standard feature within the system, as there seem to be a lot of requests for this functionality. Answer: The following widget scripts will allow you to sort categories in a bar/column chart. You can change the order of items in sortOrder to change the order. They cater to when you want to sort by a Break By, or when you want to sort by Categories with no Break By. BREAK BY: widget.on('processresult', (w, args) => { var sortOrder = ['Yellow', 'Black', 'Red', 'Blue ', 'Gold', 'Silver'] args.result.series.sort(function (a, b) { return sortOrder.indexOf(a.name) - sortOrder.indexOf(b.name) }) }) The configuration is also attached in a screenshot below: ALT Text: A bar chart displaying total order quantities by region. Two regions are represented: Europe and USA. Each region has bars segmented by color: yellow, blue, black, gold, red, and silver. The chart highlights comparisons in order quantities between the two regions, with specific quantities not indicated in the image. CATEGORIES: If you're aiming to sort by the Categories directly, then you can use the following instead: widget.on('processresult', (w, args) => { var sortOrder = ['USA', 'Europe'] args.result.series[0].data.sort(function (a, b) { return sortOrder.indexOf(a.selectionData[0]) - sortOrder.indexOf(b.selectionData[0]) }) args.result.xAxis.categories.sort(function (a, b) { return sortOrder.indexOf(a) - sortOrder.indexOf(b) }) }) This configuration looks like this: ALT text: Bar chart comparing total order quantity between the USA and Europe. The USA has a higher total order quantity than Europe, with both categories represented in dark blue bars on a white background. This was tested using Sample Retail. Let me know how it goes for you in the comments! Check out this related content: Academy Documentation2.1KViews3likes4CommentsHow to identify and download logs from the Sisense server
To identify and download ec-bld logs in Sisense, first, log into the Sisense server and run kubectl -n sisense get pods | grep bld during the cube build to find the relevant pod name. Once the build is complete, locate the log file in /var/log/sisense/sisense/ (for single-node) or use kubectl cp commands to retrieve logs from fluentd or management pods (for multi-node). Finally, access the Admin File Manager > Data folder to download logs and clean up local copies if needed.2KViews1like0CommentsHow to record a .har file and identify if specific requests are present in logs
To record a .har file in Chrome, open Developer Tools > Network tab, enable recording, clear logs, and reproduce the issue before exporting the file. To check for jaql requests, filter by "jaql" in the Network tab and inspect the request status and X-Request-ID. For on-premise Sisense, use cat /var/log/sisense/sisense/<log_file_name> | grep <X-Request-ID> (single-node) or kubectl exec (multi-node) to search logs for the request.1.5KViews1like0CommentsHow to check specific pods CPU/memory consumption in Grafana
To check pod CPU and memory usage in Grafana, go to Dashboards > All Pods per Namespace, select sisense, adjust the time frame, and filter by pod name. Ensure CPU and memory graphs are visible in screenshots, taking separate ones for different pod types.1.4KViews2likes0CommentsHow to Fix Build Failure Caused by Hitting Java Memory Limit for TDengine Connector
How to Fix Build Failure Caused by Hitting Java Memory Limit for TDengine Connector There may be a lot of reasons for out-of-memory errors when building a cube. However, when you check the logs from UI and see a Java heapspace error in them, it means that the RC that connectors container which starts inside the build pod is hitting the Java memory limit. The most common reason for this error to appear is the presence of unusually long strings somewhere in the table. How to solve this issue: 1) Identify the table which is causing the issue (it should be mentioned in error from UI) 2) Look through the columns of this table and check if any text columns have abnormally long entries. If yes, consider dropping these columns. 3) Adjust the connection string for the table in question adding batchfetch:true parameter. Example of connection string: String jdbcUrl = "jdbc:EXAMPLE-RS://example.com:6041/power?user=user&password=password&batchfetch:true"; The default value for the batchfetch parameter is ‘false’. When set to ‘false’ it pulls result sets row by row. However, when set to ‘true’ it pulls result sets in batches when executing queries. Since TDengine transfers data via a WebSocket connection, when batchfetch is added to the REST connection and set to true, it will enable the WebSocket connection. The WebSocket connection allows the JDBC REST connection to process large volumes of data when querying.745Views0likes0CommentsResolving Build Failures Due to Memory Issues [Safe-Mode]
This is the guide of which settings should be checked and adjusted to resolve the problem and prevent future occurrences, in cases when cubes fail with the error ‘Safe-mode’. Please follow the steps below, and after that try to re-build the failed cubes.500Views1like0Comments