Quantcast

[sonar-dev] Configuring ruby chart method

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[sonar-dev] Configuring ruby chart method

Patroklos Papapetrou
Hi Sonar devs

Is it possible to configure the ruby chart method in order to provide the width in percentage ( not in pixels ) and the color of the bars?

Regards
Patroklos


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Configuring ruby chart method

Simon Brandhof
Hi Patroklos,

The chart() method generates a PNG image, so by definition size must be set in pixels must not in percents. The parameter to change bar color is "c=<hexa>", for example c=DDDDDD. Note that it's not possible to have bars with different colors.

Note there's another method to generate bars : barchart(), that is badly named, generates a single HTML horizontal bar. It's used for example in the widget of violations. It also requires to declare a fixed width in pixels.

Regards


On 6 September 2012 09:52, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Sonar devs

Is it possible to configure the ruby chart method in order to provide the width in percentage ( not in pixels ) and the color of the bars?

Regards
Patroklos





--

Simon BRANDHOF | SonarSource
http://sonarsource.com

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Configuring ruby chart method

Patroklos Papapetrou
Thanks a lot Simon!!
Regards
Patroklos

2012/9/6 Simon Brandhof <[hidden email]>
Hi Patroklos,

The chart() method generates a PNG image, so by definition size must be set in pixels must not in percents. The parameter to change bar color is "c=<hexa>", for example c=DDDDDD. Note that it's not possible to have bars with different colors.

Note there's another method to generate bars : barchart(), that is badly named, generates a single HTML horizontal bar. It's used for example in the widget of violations. It also requires to declare a fixed width in pixels.

Regards



On 6 September 2012 09:52, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Sonar devs

Is it possible to configure the ruby chart method in order to provide the width in percentage ( not in pixels ) and the color of the bars?

Regards
Patroklos





--

Simon BRANDHOF | SonarSource
http://sonarsource.com


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Configuring ruby chart method

Patroklos Papapetrou
In reply to this post by Simon Brandhof
Is something similar ( about coloring ) available also in piechart method?  

2012/9/6 Simon Brandhof <[hidden email]>
Hi Patroklos,

The chart() method generates a PNG image, so by definition size must be set in pixels must not in percents. The parameter to change bar color is "c=<hexa>", for example c=DDDDDD. Note that it's not possible to have bars with different colors.

Note there's another method to generate bars : barchart(), that is badly named, generates a single HTML horizontal bar. It's used for example in the widget of violations. It also requires to declare a fixed width in pixels.

Regards



On 6 September 2012 09:52, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Sonar devs

Is it possible to configure the ruby chart method in order to provide the width in percentage ( not in pixels ) and the color of the bars?

Regards
Patroklos





--

Simon BRANDHOF | SonarSource
http://sonarsource.com


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] Configuring ruby chart method

Simon Brandhof
Sorry but no. We should definitely improve these helpers...

On 6 September 2012 11:01, Papapetrou P.Patroklos <[hidden email]> wrote:
Is something similar ( about coloring ) available also in piechart method?  

2012/9/6 Simon Brandhof <[hidden email]>
Hi Patroklos,

The chart() method generates a PNG image, so by definition size must be set in pixels must not in percents. The parameter to change bar color is "c=<hexa>", for example c=DDDDDD. Note that it's not possible to have bars with different colors.

Note there's another method to generate bars : barchart(), that is badly named, generates a single HTML horizontal bar. It's used for example in the widget of violations. It also requires to declare a fixed width in pixels.

Regards



On 6 September 2012 09:52, Papapetrou P.Patroklos <[hidden email]> wrote:
Hi Sonar devs

Is it possible to configure the ruby chart method in order to provide the width in percentage ( not in pixels ) and the color of the bars?

Regards
Patroklos





--

Simon BRANDHOF | SonarSource
http://sonarsource.com





--

Simon BRANDHOF | SonarSource
http://sonarsource.com

Loading...