COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => RAVE Visualizations => Topic started by: russelljmunn on 06 Nov 2015 09:21:08 AM

Title: Fixed Scale in RAVE Chart
Post by: russelljmunn on 06 Nov 2015 09:21:08 AM
Hi,

I'm currently editing a horizontal bar chart using the Visualization Customizer. When I use the chart in my report I want the x axis to always have a minimum value of 0 and a maximum value of 100 (I will be plotting percentage values in my report). Does anyone know how to force RAVE to set a fixed scale?

I see this code in the JSON file and suspect there is something I can amend:

"scale":
{
   "local":false
},
"axis":

Any help would be much appreciated.

Russell
Title: Re: Fixed Scale in RAVE Chart
Post by: Christian85 on 06 Nov 2015 09:44:57 AM
Hi there,

you can accomplish this by setting spans in the scale:

        "spans":
          [
                {
                    "max" : 5,
                     "min" : -5
                 }
           ],

Hope that helps!

Christian
Title: Re: Fixed Scale in RAVE Chart
Post by: russelljmunn on 06 Nov 2015 10:25:49 AM
Yes it does! Thank you so much.

FYI, I had to include the spans definition inside the "scale" section of the definition to get it to work like this:

"coordinates":
         {
            "dimensions":
            [
               

               
               {
                  "scale":
                  {
                     "spans": [ {"max": 100, "min": 0} ]
                  },
                   ...