intermine / im-tables-3

clojurescript library to display and manipulate intermine query results on a webpage
http://www.intermine.org
GNU Lesser General Public License v2.1
5 stars 5 forks source link

Support rounding of columns with numeric values #100

Open heralden opened 4 years ago

heralden commented 4 years ago

If a column is numeric, a button should appear in its column header that allows rounding of the numbers to a chosen decimal point. This rounding will only apply to the values of this column, on this specific table.

AdrianBZG commented 4 years ago

Also, an option to round all numbers in all columns by default would be helpful, otherwise the user would need to be clicking the round button in every column each time a page is accessed.

heralden commented 4 years ago

The team thought that having it by default wouldn't be a good idea.

I guess the middle ground would be to have it global then. I think there are some different approaches:

I'm guessing the second one is what you want?

AdrianBZG commented 4 years ago

Yes, the second one sounds like a good approach, although that would mean specifying columns path by path. In some sources I have more than 20 columns with decimal numbers, so that's why I was suggesting to also have some kind of global rounding option. But it's fine to go with the second option you mention.

heralden commented 4 years ago

Do those 20 columns point to the same class? If so we could instead specify rounding for classes.

Edit: The rounding should be specified for an attribute of a class.

AdrianBZG commented 4 years ago

Yes, they belong all to the same class

heralden commented 4 years ago

Sounds good! We'll have to figure out where this should be defined, but I'm guessing it will be in a property file on the Intermine backend.

danielabutano commented 4 years ago

We can use the webconfig_model.xml file, in the mine instance, to add the new property rounding