How to remove the decimal points for a field using CAP CDS annotations?
Use #Scale annotation as it takes integer value that specifies the number of decimal places to display for a field.
For your use case, set the #Scale value to 0.
Related
Please refer the image
I want the cell to be highlighted based on the value is less than or greater than the value in the benchmark column. I am not able to do that using conditional formatting custom formula. I have manually applied formatting for 02/01/2023 . I want the formatting to apply to the column with date = today() only.
Thanks :)
I can write a custom formula for each row of each date column. But is there any way a single custom formula that could format across rows and columns?
I'm guessing your fist value of 02/01/2023 and Activity1 is C2. Then for the whole range C2:Z (or whichever you have):
=C2>=$B2
Do this for one color for the whole range and it will drag automatically, you don't need to write it as an arrayformula. The "$" will always refer to the value in column B from the row it's positioned
if you are selecting whole range (C2:Z), try this for green and red respectively:
=(C2>=$B2)*(C2<>"")
=(C2<$B2)*(C2<>"")
I am trying to create a simple chart where xAxis is the date the user selected an attribute while yAxis is the attribute the user selected.
Each attribute corresponds to a value starting from 0. So for example, attribute0 has a value of 0 and so on.
What i would like to do is to not display yAxis grid lines for attributes that were not selected by the user.
As can be seen in the screenshot the user has selected attributes 3,4,5 and 9. The problem is that i don't want to show yAxis grid lines for the rest of the attributes(1,2,6,7 and 8) while preserving the value of the displayed attributes. This means that i want attribute 9 to have a value of 9 even if it is displayed in line 4 in this example(assuming that there is a way to skip empty gridLines)
The end result i would like to be like this for this example.
If the user selects a new attribute the next day, one that does not already exists in the graph, this attribute should be added in the same way.
Any ideas?
I hope i am explaining my self correctly.
Thank you in advance.
You can do this by using categories on the y axis.
Your y values then need to be the category index of the selected value, rather than the value itself.
So, in your example, you would have:
categories = ['3','4','5','9']
And the y values for that would be 0,1,2,3 instead of 3,4,5,9.
Something like (random x value used):
data: [[100,0],[100,1],[100,2],[100,3]]
Example:
http://jsfiddle.net/3d3fuhbb/62/
I am using HTML to display values in my shared tooltip. I am using html so as to align my numerical values for both my series to right. Not sure if there is any other way. But the number values in the tooltio appear to be seperated by decimal points. Is there a way to have comma seperated values in the tooltip. Something like (123,123,123) ?
Yes, you can set it with the thousandsSep. It defaults to , so you may have a different language setup that is forcing ..
Just a simple answer needed, is there a simple way to compare a series on values rather than percentages? Something like "compare : 'values'" rather than "compare : 'percent'" or do I manually have to add data points for given time intervals? Thanks!
Yes, but the option is called value
From the plotOptions.series.compare documentation:
compare: String
Compare the values of the series against
the first value in the visible range. The y axis will show percentage
or absolute change depending on whether compare is set to "percent" or
"value". When this is applied to multiple series, it allows comparing
the development of the series against eachother. Defaults to
undefined.
The demos from the documentation: Setting compare to percent, value.
I have a text field where I write a number; if I write inside this textfield a number without decimal point, I want to take this value and add a decimal point and two number after it
if I write (in textfield) "1" , I want to add ",00" then it becomes 1,00
if I write "1,8" , It becomes : "1,80"
or
if I write "2,86", It don't change : "2,86"
when I solve it I want to add this value in an array.
You should have a look into NSNumberFormatter.