cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
NOTES: This plugin works with Sisense version 6.6.1 or later.
This plugin adds additional functionality to bar charts, allowing them to show custom images in the end of each bar. This could be useful to make, for instance, leader boards look more attractive.
The result of applying and configuring the plugin is shown below.
Configure plugin
To make a plugin you need to make the next steps:
  1. Make sure your elasticube table contains the column with all required images for every row;
    (it is okay if some rows won't have an image - if these rows will be shown in the charts, the image just won' render)
  2. Create a new custom field in elasticube, using two columns 1 - the column you initially wanted to use as
    a category, 2 - the image URL table. Combine this 2 columns using next SQL expression: IfString([photolink] != NULL, [name] + '---' + [photolink], [name] + '---') See image below:

    as a result, you should have a column, which has something similar to the line below in its rows:
    Name Surname---http://www.example.com/example.png
  3. Go to Sisense and create a bar chart with the field generated on step 2 as category and a random number of values
Select one of the values in the panel you want to attach an image to, open its menu, and click Use For Image menu item:
Now you will see images appearing in the end of bar items for which data-items in elasticube image url was specified.
 
Notes regarding images usage
  • Plugin supports .png .jpeg and .gif file extensions. 
  • Although HTTPS links could be used as image sources, it may cause inappropriate behaviour, thus usage of HTTP links is recommended
  • Local images can be used. To make it work place images under /images folder under the plugin folder and use next links in elasticube: /plugins/imagesInBarChart/images/<imageNmae>. The folder could be different but in this case, links in elasticube should be added appropriately
Notes regarding CSV export
As the widget is using the newly generated field as a category, when exporting to CSV you will see the generated field which contains a Name and link in each row instead of just a Name. If CSV export is critical follow the steps below to change the field with name and link to the name field.
  1. Open widget edit script view.
  2. Enter next code in opened editor:
    prism.swapFields(widget, {fieldToBeChanged: "[Sheet1.NamePic]", fieldToBeUsed: "[Sheet1.name]"})
    where [Sheet1.NamePic] - is the name of field with names and links, and [Sheet1.name] - is a field with names only
Limitations with exporting to image
Export to the image from widget view is not working due to limitations in third party library used to export HTML to png.
Dashboard export to pdf and png is working fine.
Version history
Last update:
‎03-02-2023 09:25 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 community@sisense.com