Friday, November 2, 2018

Union blog graph demo

Highcharts.chart('ORUnion', { chart: { zoomType: 'xy' }, title: { text: 'Union Membership Rates for States, 2017' }, subtitle: { text: 'Column = Max of All State Rates' }, xAxis: [{ categories: ['Total Membership', 'Private Sector', 'Public Sector', 'Manufacturing', 'Construction'], crosshair: true }], yAxis: [{ // Primary yAxis labels: { format: '{value} %', style: { color: Highcharts.getOptions().colors[1] } }, title: { text: 'Union Membership Rate of Employed', style: { color: Highcharts.getOptions().colors[1] } } }, { // Secondary yAxis title: { text: 'Oregon Rank Among States', style: { color: Highcharts.getOptions().colors[0] } }, labels: { format: '{value} %', style: { color: Highcharts.getOptions().colors[0] } }, opposite: true }], tooltip: { shared: true }, legend: { layout: 'vertical', align: 'left', x: 120, verticalAlign: 'top', y: 100, floating: true, backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || 'rgba(255,255,255,0.25)' }, series: [{ name: 'Max of All State Membership Rates', type: 'column', yAxis: 1, data: [23.8, 15.2, 67.4, 23.2, 41.0], tooltip: { valueSuffix: ' %' } }, { name: 'Oregon Membership Rate', lineWidth: 0, states: { hover: { lineWidthPlus: 0 } }, type: 'spline', data: [14.9, 8.3, 53.1, 8.3, 19.0], tooltip: { valueSuffix: ' % ' } }] });

No comments:

Post a Comment