Rounded values in iOS-charts - ios-charts

I'm using ios-chart library, when I set this:
set1.drawValuesEnabled = true
in LineChartDataSet, my values are rounded as Int value (Example: 5.4 to 5)
This happen only when a get the values from api service, I convert the values of my array from String to Double
I'm printing the values before I assign to dataset and the values are correct. I don't want rounded values
Thanks for any help

use custom valueFormatter in dataSet objects.

Related

Mixing a line with pies or sectors

A table consists of 4 fields:
X: time values in ascending order
Y: numeric value - double
A: numeric value - int
B: numeric value - int
I need to create a line chart using the X,Y values. And at each of the x,y points also show a pie/circle representing the A,B values as follows:
The centre of the pie is the x,y point.
The diameter of the pie is calculated from the values A and B.
The pie will have 2 different coloured slices, the size of each slice is proportion to the value of A and B.
After searching the documentations of lcjs, can this be done using Lightning Charts JS? if not, how about lc.NET?
Any hints is much appriciated.
Thank you
In LightningChart JS, I don't believe there is such functionality available.
Something like this should be possible (bar instead of pie)

holoviz param and panel: how to get a slider that allows a discrete list of irregularly-spaced float values?

I am using holoviz param and panel to create a dashboard displaying gridded data on a map. I have two sliders to select grid coordinates x and y. Moving the sliders displays some data for the specified gridcell.
Right now I'm using two param.Integer objects to create the sliders with the bounds set to the dimensions of the xarray dataset containing the data. When a slider moves I grab a new slice from the dataset and update the dashboard.
I'd like my sliders to display the actual longitude and latitude coordinates, not the integer indices to the xarray dataset.
I can think of several ways to do this, but haven't gotten any of them to work.
update the displayed value on the slider to show the lat or lon. This keeps the internal slider value an integer but displays the float. I can't figure out what to update in the callback to change this value.
create sliders that display lat and lon as floats. The slider's allowed values would need to come from the list of lat and lon coordinates. The step between allowed values is not constant. So I'd need a float slider that allows, say, [74.0, 74.2, 74.5] and no other values.
Maybe (probably!) I'm just really dense but I can't quite see how to plug together the arguments to param.Number or param.Integer to make (1) or (2) happen.

charts_flutter How to remove commas in y axis number values

I am using charts_flutter package. How can I remove those commas in y-axis values? For example, instead of 1,720 I want to have 1720.
Actually, they are integer values and you are looking for turnOffGrouping method of int. Or, you can customize your GROUP_SEP by declaring your own NumberSymbols.

How to use a range instead of a single value for an axis tick in Tableau?

I don't want to mess with the graph itself, but I want to change the axis tick so that it reads a different value. Right now my axis looks like 0, 1, 2, 3....24. I want it to look like: 0-1,1-2,3-4...23-24.
Is it possible to just change the text without changing my graph?
Thanks in advance!
One way to implement this would be by converting your column in to a discrete value and changing the alias for value 0 to 0-1, 1 to 1-2... and so on.
Hope this helps.
Another option is to create a calculated field and return the range based on the values. This gives you more control if you would like customize your range in the future. There will be an issue with sorting which you will need to work out.

Specify the type of the output of a Calculator filter

It seems as though the result of a Calculator filter is always a double array. Is there a way to change this type? For example, if I create a Sphere Source, then use a Calculator filter with the following:
1*iHat + 2*jHat + 0*kHat
I get an array that could theoretically be used to color the points (i.e. it is interpretable as RGB 3-vectors), but it is of type 'double' so Paraview cannot use it for coloring (without color mapping).
As of ParaView 5.1.2, and perhaps earlier versions, you can actually interpret 3-tuple arrays of doubles as colors the way you describe. Color values are specified in the range [0, 1] for double and float arrays instead of [0, 255] for unsigned char arrays.
To show these Calculator-defined colors without color mapping, color by the Calculator output array, then uncheck the option Map Scalars in the Properties panel.