Wijmo UI for the Web
seriesStyles Option
wijmo.chart.wijbarchart Namespace > options type : seriesStyles Option

Sets an array of style objects to use in rendering the bars for each series in the chart.

Type: Array

Default value: []

Syntax
$(function () {
    
    // Get value
    var returnsValue; // Type:  []
    returnsValue = $(".selector").wijbarchart("option", "seriesStyles");
    
    // Set value
    var newValue; // Type:  []
    $(".selector").wijbarchart("option", "seriesStyles", newValue);
        
});
var seriesStyles : ;
Example

This code creates a chart with three series. Each series has a different fill and outline color, and all three have 70% opacity so that the grid lines show through the bars, as in the image below.

<script id="scriptInit" type="text/javascript">
    $(document).ready(function () {
        $("#wijbarchart").wijbarchart({
            seriesList: [{
                label: "US",
                data: 
                { 
                    x: ['PS3', 'XBOX360', 'Wii'], 
                    y: [12.35, 21.50, 30.56] 
                }
            }, 
            {
                label: "Japan",
                data: 
                { 
                    x: ['PS3', 'XBOX360', 'Wii'], 
                    y: [4.58, 1.23, 9.67] 
                }
            }, 
            {
                label: "Other",
                data: 
                { 
                    x: ['PS3', 'XBOX360', 'Wii'], 
                    y: [31.59, 37.14, 65.32] 
                }
            }],
            seriesStyles: [
                {fill: "blueviolet", stroke: "navy", opacity: 0.7}, 
                {fill: "turquoise", stroke: "teal", opacity: 0.7}, 
                {fill: "fuchsia", stroke: "blue", opacity: 0.7}],
        });
    });
</script>
Remarks

Each style object in the array applies to one series in your seriesList, so you need specify only as many style objects as you have series objects in your seriesList.

The style is also used in the legend entry for the series in your seriesList. For more infomration on available style parameters, see the Style Options topic.

See Also

Reference

options type
wijbarchart Method