Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative value in bauge / gauge #9

Open
TimTeaFan opened this issue Aug 27, 2019 · 1 comment
Open

Negative value in bauge / gauge #9

TimTeaFan opened this issue Aug 27, 2019 · 1 comment

Comments

@TimTeaFan
Copy link

TimTeaFan commented Aug 27, 2019

I tried using negative values in a billboarder::bauge in shiny and somehow it seems like negative values are not displayed - am I doing something wrong or is this a known issue?

Further, when using positive values while having a negative "min" value, only the positive area is rendered, meaning when min = -100 and max = 100 a value of 25 shows only a colored area that equals 25% which is not correct. Again, I might be doing something wrong. If not, is there a fix for this issue?

Update: As far I understand it, this problem seems to be rooted in the billboard.js library itself. So maybe not an issue for this package.

See Code below:

library(shiny)
library(billboarder)

shinyApp(
    
    ui = fluidPage(

        baugeOutput(outputId = "gauge")
        
    ),
    
    server = function(input, output) {
        
        output$gauge <- renderBauge({
            
                            bauge(
                                value = -25, # alternatively use 25 instead of -25
                                min = -100,
                                max = 100,
                                colors = c("#FF0000"),
                                label_format = suffix("")
            )
            
        })
        
    }
    
)

@pvictor
Copy link
Member

pvictor commented Sep 10, 2019

Hello,

This isn't currently supported, I asked the question here : naver/billboard.js#1071 if you want to follow up.

Victor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants