Dear visitor, despite the COVID-19 outbreak, our team continues operating at full speed.

Also, here is the form where you can apply for a special discount and we will contact you with possible options. Stay safe and continue achieving your business goals.

Fill the form
Get Free Trial
Get Free Trial

how to avoid decimal numbers in column steps and ensures column steps are always whole numbers

Answered
amir asked on April 29, 2020

My requirement is that I am plotting departments with some count like employ count in each department. Now if I apply filters and the result id department wit only one employee in this case it shows 0.5 on y-axis and graph for 1. As count of employes cannot be fractional (0.5, 1.5 so on) so i want to have only whole numbers (1,2,3,4..) on my y-axis. How can we do this??? I am using the paid develpment api key provided to me by my client. 
Apart from this I also want to know about if my legends are slightly longer texts, flex monster shows the trauncated part of the legend. How can I show the full legends on hovering the trauncated legend

3 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster April 29, 2020

Hello,
 
Thank you for your question.
 
In case we understand you correctly, your requirement is to round numbers appearing on the grid and charts. It is possible to limit the number of decimal places using the format object and particularly its decimalPlaces property.
 
It defines the number of decimals to appear after decimal separator in the fractional part of the number. The default value is -1, it means the number will not be changed, and it will be shown in its original form.
We recommend checking out our tutorial dedicated to number formatting.
Please see an example we have prepared for you.
 
Do not hesitate to let us know in case another result needs to be achieved.
 
Concerning the trimming of legends, our team would like to kindly explain that such behavior can not be disabled.
 
Finally, our team would like to kindly ask you to name an actual license holder, it is required for our internal records (the answer can be provided through email).
 
We hope it works for your case.
You are welcome to contact us in case of additional questions.
 
Kind regards,
Illia

Public
amir April 30, 2020

Formating decimal the way you mentioned was already done by me but the problem I am facing in this is that if I have only one data it still shows two lines in the column and each line is labeled as 1 as in the following example  https://jsfiddle.net/amirsamad/04k8m71e/2/. In this case, I want only one line marked 1.
For the second point I do not wish to disable the text truncation. I just want to have a title over it so that I can see the entire text when I hover over it (the chart legend). 
Also, the tooltip on hovering the graph columns truncates the text. This is the truncation I want to avoid like For example https://jsfiddle.net/amirsamad/04k8m71e/8/  if you hover over the graph column you will see the text truncated. How can I see the full text here?
Apart from these as graph columns are clickable that takes you to related chart how can I make cursor as pointer here to signify user that the column is clickable
For your information regarding the account from which the API key was purchased please provide the email id on which I can revert with the user name of the actual key holder.

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster April 30, 2020

Hello,
 
Thank you for providing us with examples.
 
Concerning axes’ marks, our team would like to kindly explain that the described behavior can not be changed in the current version of Flexmonster.
We suggest considering the possibility of using third-party charting libraries. The majority of them allow adjusting such marks.
 
Trimming of labels can not be disabled or modified as well when using built-in charts. It persists both for the chart itself and for on-hover tooltips.
Integrating with third-party charting libraries allows adjusting such behavior as well.
 
You are welcome to check out an example we have prepared for you. It uses Highcharts and implements marks’ rounding. Labels are not truncated by default; however, it can be adjusted in the desired way through modification of the data object before it is passed to Highcharts. All objects and properties required for modification can be found in Highcharts documentation.
 
We recommend checking out our tutorial dedicated to the integration with Highcharts.
Flexmonster provides ready-to-use connectors for FusionCharts and Google Charts as well. It is also possible to integrate with any other charting library. Tutorials on mentioned integrations can be found in the same drop-down where tutorial on Highcharts is placed.
 
Finally, in order to change the cursor when hovering over drillable elements of built-in charts, the following CSS should be added to the page:

.fm-bar, .fm-circle, .fm-scatter-point, .fm-arc, .fm-barStack {
  cursor: pointer;
}

 
Concerning the information about the license holder, our team will contact you through email.
 
You are welcome to contact us in case of additional questions.
 
Best regards,
Illia

Please login or Register to Submit Answer