Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Use the displayed text from the pivot grid in the chart label

Resolved
Brendan Fry asked on May 6, 2020

Hi,
 
Please see my attached image.
Is it possible to have the chart display the text from the grid on the label? And for me to format the x and y axis values so they match the units, rather than the raw data value?
Thanks
Brendan

Attachments:
formatting chart.png

9 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 7, 2020

Hello, Brendan,
 
Thank you for contacting us.
 
If we understand you correctly, one of the problems you are facing is that values on the chart differ from ones presented on the grid. If so, our team would like to kindly ask you to provide us with sample data and the report so that we could investigate the issue on our side.
 
In case the problem differs from the one described above, could you please provide more details about the issue?
 
Concerning the absence of units after the number, we would like to kindly inform you that the problem is not reproducible on our side. Please note that such units will be displayed both on the grid and charts only in case they are specified as the currencySymbol property of the format object, linked with the desired measure (“Zone Area” for your case).
 
For example, the desired configuration can be achieved using the following code snippet:

slice: {
  ...
  "measures": [{
    "uniqueName": "Zone area",
    "aggregation": "sum",
    "format": "format1"
  }]
},
"formats": [{
  "name": "format1",
  "currencySymbol": "ft²",
  "positiveCurrencyFormat": "1$"
}]

 
You are welcome to check out an example we have prepared.
Finally, we suggest checking out our tutorial dedicated to number formatting.
 
Our team is looking forward to hearing from you.
 
Best regards,
Illia

Public
Brendan Fry May 11, 2020

Hi,
We use a custom function to format the text in the grid, the underlying value is in millimetres and we convert that to feet at display time. The chart is displaying the underlying value in mm not the ft/inches the grid displays.
So I need to (or the control needs to) convert the labels and hover over in the chart from mm to the display text ft/inches.
Does that make sense?
Thanks
Brendan

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 13, 2020

Hello, Brendan,
 
Thank you for providing us with details.
 
In case the customizeCell is used in order to format values, our team would like to kindly explain that such formatting does not affect charts.
 
We recommend preprocessing the data set itself so that it contains values converted to feet. Adding the “ft²” should be performed using the currencySymbol property of the format object. Such an approach allows achieving an appropriate display both for the grid and charts.
 
We hope it works for your case.
Do not hesitate to contact us in case additional assistance is needed.
 
Best regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster May 25, 2020

Hello, Brendan,
 
Our team is wondering whether our suggestion was helpful for your case.
 
We are looking forward to hearing from you.
 
Kind regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 4, 2020

Hello, Brendan,
 
We would like to ask whether our advice was helpful for your case.
 
Our team is looking forward to your feedback.
 
Regards,
Illia

Public
Brendan Fry June 12, 2020

I have finally found time to implement this and it works.
Thanks

Public
Brendan Fry June 15, 2020

Hi,
I have added the suffix of m² to the column in the attached screenshot.
This works in the grid. However I see ² in the chart.
If I use

ft²

I get the unknown char (black square – question mark) in the grid.
Please tell me the correct format to use.
Thanks
Brendan

Attachments:
chart.PNG
grid.PNG

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 15, 2020

Hello,
 
Thank you for reaching out to us.
 
Our team would like to kindly explain that charts are built using SVG elements. Such elements are unable to parse HTML entities as the mentioned ² one. Instead, the desired symbol itself should be specified as a UTF-8 character:

"currencySymbol": "m²" -> "currencySymbol": "m²"

 
Please see an example demonstrating such an approach.
 
Concerning the display of the unknown char, our team wants to inform that the problem is not reproducible on our side. It would be useful for our investigation if you could provide us with a sample where the problem could be seen. Another option is to modify the previously provided example in the way the mentioned unknown chart is displayed instead of “ft²”.
 
We are looking forward to hearing from you.
 
Best regards,
Illia

Public
Brendan Fry June 15, 2020

Sorted it thanks, file saved as wrong format.
Thanks

Please login or Register to Submit Answer