• Hi!

    Unfortunately I do not know how I can change the colors of the bars or where I need to include the option “COLORS” in the code, so that it works correctly and the colors of the bars change.
    Thanks for the help!

    This is what I use:

    [loadNVD3]
    [jsChart type=’discretebar’ datafile=” values=”(92.48,0.0,0.0,0.0)” labels=”(2014,2014 REVISED,2015,2015 REVISED)” series=”(BENCHMARK)” height=250 width=450 float=’none’ border=’0px outset gray’ backgroundcolor=’#6ba53a’ options='{ shadows: “Black” , showLegend: true, tooltips: true, showControls: true, noPopup: false, noResize: false, title: “HOTEL CHART”, chartpicker:true, exports:false, autocoloring:true, calculator:”*1″, calculatorlock:false, calculatorhide:false, calculatortitle:”Calculate:”, calculatorunit:”unit”, xaxis:{ hide:false, style:”font-size:10px; fill:white”, transform:”rotate(0 -20,0)” }, yaxis:{ style:”font-size:12px; fill:white”, transform:”rotate(0 -20,0)” } }’ ]

    For the labels=”(2014,2014 REVISED,2015,2015 REVISED)
    I need the colors: green,red,green,red

    I try with this:
    options=”{colors:’green,red,green,red’}” – Unfortunately, I do not know where this code to include.

    https://www.ads-software.com/plugins/nvd3-visualisations/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jouni Santara

    (@jouni-santara)

    Hi,

    You just add them like your values & labels in shortcode call.
    Except, that the structure must be object of JavaScript.

    Try this first to test it with a simple example:

    [jsChart type=”Pie” options=”{ colors:’green,red,green,red’ }”]

    Be careful about those quotes to get it right.

    There are more examples of using of colors in the file: examples/shortcode_colors_demo.txt

    Good Luck !

    Plugin Author Jouni Santara

    (@jouni-santara)

    Btw,

    This seems to work very well for your own data set:

    [jsChart type=”Pie” options=”{ colors:’green,red,green,red’ }” values=”(92.48,7.0,11.0,5.0)” labels=”(2014,2014 REVISED,2015,2015 REVISED)”]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change the color of bars’ is closed to new replies.