getredash / redash

Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.
http://redash.io/
BSD 2-Clause "Simplified" License
26.47k stars 4.39k forks source link

Counter visualization format is disabled #5071

Open ilanbe opened 4 years ago

ilanbe commented 4 years ago

Issue Summary

Counter visualization format editing is disabled. When configuring a counter, the formatting option for the counter value are disabled. Surprisingly, if the "Count Rows" is selected, the formatting is editable again,when it is expected to be the other way around.

Steps to Reproduce

  1. define a query (tested on oracle and postrese) select 20.2222222
  2. Define a counter
  3. Try to format the value.

ezgif com-video-to-gif

Technical details:

kravets-levko commented 4 years ago

Hi @ilanbe! Format settings will be disabled when counter value is not a number - was this your case?

ilanbe commented 4 years ago

Hi @kravets-levko Just rechecked; the problem occur when the number is decimal

20.56546456 - Problem 50 - OK 30.2 - Problem 30.43 - Problem 0 - OK

ilanbe

ilanbe commented 4 years ago

Closed by misteke

kravets-levko commented 4 years ago

Thank you for feedback @ilanbe! Can you please provide a minimal data sample to reproduce this issue (e.g. export CSV from your query) or reproduce this on our demo instance?

ilanbe commented 4 years ago

This is the test data "ID","AMOUNT","TEST" 4,20.56546456,"xxxxx" 5,50,"xxxx" 6,30.2,"xxxxx" 7,30.43,"xxxxx"

Thanks for the prompt response ilanbe

kravets-levko commented 4 years ago

Thank you @ilanbe! I managed to reproduce this on preview instance only with string values (e.g. SELECT '20.56546456'), if query returns a numeric value - everything works fine. I'll look into code a bit later, for now please check and ensure that your query returns numbers and not strings

ilanbe commented 4 years ago

It seems that the issue is specific to Oracle. but the column in question is defined as "NUMBER", so no reason to return string

kravets-levko commented 4 years ago

@ilanbe thank you for the update! one more thing you can try is upgrading to latest Redash version (however, I'm not 100% sure that it will help)