$(function(){ var all_chart_options = {"chart":{"renderTo":"chart3","margin":[100,40,80,80],"borderWidth":0,"plotBorderColor":"#000","plotBorderWidth":0,"type":"line","events":{"redraw":function redraw() { if (chart) { $.each(chart.series, function (i, serie) { $.each(serie.data, function (j, point) { if (point.options.cursor === "pointer") { point.graphic.attr({ cursor: 'pointer' }); } }); }); } }},"zoomType":null,"alignTicks":false,"ignoreHiddenSeries":true,"inverted":false},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1","#2f7ed8","#0d233a","#8bbc21","#910000","#1aadce","#492970","#f28f43","#77a1e5","#c42525","#a6c96a"],"legend":{"align":"left","alignColumns":false,"backgroundColor":"none","borderColor":"none","borderWidth":0,"enabled":true,"floating":true,"itemDistance":30,"layout":"horizontal","reversed":false,"shadow":false,"symbolRadius":0,"title":{},"useHTML":false,"verticalAlign":"top","width":540,"x":155,"y":40,"itemStyle":{"fontFamily":"Calibri, Arial, Helvetica, sans-serif","color":"#000","cursor":"pointer","textOverflow":"wrap"},"itemHiddenStyle":{"color":"gray"},"itemHoverStyle":{"cursor":"pointer"}},"plotOptions":{"series":{"events":{"legendItemClick":function legendItemClick(event) {}},"dataLabels":{"enabled":false,"allowOverlap":false,"padding":0,"verticalAlign":"bottom","style":{"textShadow":"none","color":"#000"}},"pointPlacement":null,"stacking":null,"pointPadding":0.1,"groupPadding":0.2,"minPointLength":2,"minSize":4,"sizeBy":"width","lineWidth":1.5,"states":{"hover":{"lineWidth":4}},"marker":{"enabled":false,"states":{"hover":{"enabled":true,"radius":5}}}},"bubble":{"tooltip":{"followPointer":true}},"line":{},"boxplot":{"fillColor":"#F0F0E0"},"pie":{"showInLegend":true,"size":"130%"}},"series":[{"name":"Benchmark","data":[91,91.1,96.1,102,106.3,107.6,106.4,105.9,104,100.7,97.4,92.3,91.6,91,95.2,101.9,106.3,107.7,105.8,105.2,103.5,100.1,98.3,93.6,92.1,91.5,95,102.3,106.1,107.2,105.1,104.1,103.3,100.2,98.6,94.5],"type":"line","color":"#7cb5ec","_symbolIndex":0,"stacking":null,"visible":true,"dashStyle":"Dash"},{"name":"Final model","data":[92.1,95.2,100,104,105.9,107,104.7,103.1,105,97.9,92.9,93,92.6,95,99.2,103.9,105.5,106.7,104.1,102.7,104.9,98.4,94.3,93.6,93.2,94.8,98.8,103.8,105.3,105.9,103.6,102.1,104.7,99,95.2,94.2],"type":"line","color":"#434348","_symbolIndex":0,"stacking":null,"visible":true}],"subtitle":{"text":"","align":"left","style":{"color":"#000000","fontFamily":"arial","fontWeight":"normal","fontSize":"12px"}},"title":{"text":" Figure 3. Producer Price Index for Regular unleaded gasoline benchmark vs. Final seasonal factors, 2015-2017 ","align":"left","style":{"color":"#000000","fontFamily":"arial","fontWeight":"bold","fontSize":"14px"}},"tooltip":{"backgroundColor":"#FEFFEF","crosshairs":[false,false],"formatter":function () { var options = this.series.chart.tooltip.options; var dollar = this.series.options.dollar || options.y_signs_arr[0]; var percent = this.series.options.percent || options.y_signs_arr[1]; var decimals = this.series.options.decimals || options.y_decimals; var multiple = options.multiplier; if (all_chart_options.series[this.series.index].yAxis == 1) { dollar = options.y_signs_arr_2[0]; percent = options.y_signs_arr_2[1]; decimals = options.y_decimals_2; multiple = options.multiplier_2; } var y_val = this.point.high ? "High: " + dollar + $(this.point.high * multiple).addCommas(decimals) + percent + " | Low: " + dollar + $(this.point.low * multiple).addCommas(decimals) + percent : dollar + $(this.y * multiple).addCommas(decimals) + percent; var s = "" + this.series.name + "
" + this.x + ": " + y_val; all_chart_options.series[this.series.index] ? s = all_chart_options.tooltip.addExtraData(all_chart_options.series[this.series.index].extra_data, this.point, s) : s = s; return s.replace(/\$-/g, "-$"); },"style":{"color":"#000000","fontFamily":"Calibri, Arial, Helvetica, sans-serif"},"useHTML":false,"shared":false,"addExtraData":function (extra_data, point, s) { if (extra_data && extra_data[0].name) { $.each(extra_data, function (i) { if (extra_data[i].values[point.index]) { s = s + "
" + extra_data[i].name + ": " + extra_data[i].values[point.index]; } }); } return s; },"x_signs_arr":["",""],"z_signs_arr":["",""],"y_decimals":0,"y_decimals_2":0,"x_decimals":0,"z_decimals":0,"z_title":"Z","multiplier":1,"multiplier_2":1,"y_signs_arr":["",""],"y_signs_arr_2":["",""]},"xAxis":{"categories":["Jan-15","Feb-15","Mar-15","Apr-15","May-15","Jun-15","Jul-15","Aug-15","Sep-15","Oct-15","Nov-15","Dec-15","Jan-16","Feb-16","Mar-16","Apr-16","May-16","Jun-16","Jul-16","Aug-16","Sep-16","Oct-16","Nov-16","Dec-16","Jan-17","Feb-17","Mar-17","Apr-17","May-17","Jun-17","Jul-17","Aug-17","Sep-17","Oct-17","Nov-17","Dec-17"],"gridLineColor":"#c0c0c0","gridLineWidth":0,"gridLineDashStyle":"Dot","labels":{"rotation":0,"useHTML":false,"style":{"color":"#000000","fontFamily":"Calibri, Arial, Helvetica, sans-serif","fontWeight":"normal","backgroundColor":"#fff","fontSize":"12px","textOverflow":"wrap"}},"lineWidth":1.2,"lineColor":"gray","max":null,"min":null,"plotBands":[],"plotLines":[{"value":0,"color":"#c0c0c0","dashStyle":"solid","width":0}],"startOnTick":false,"tickInterval":6,"tickmarkPlacement":"on","tickPosition":"outside","tickColor":"#C0D0E0","title":{"align":"middle","useHTML":true,"text":"","margin":6,"rotation":0,"style":{"color":"#000000","fontFamily":"Calibri, Arial, Helvetica, sans-serif","fontWeight":"normal","backgroundColor":"#fff","fontSize":"13px"},"x":0},"type":"linear"},"yAxis":{"gridLineColor":"#c0c0c0","gridLineWidth":1,"gridLineDashStyle":"Dot","labels":{"formatter":function yAxisFormat() { var decimals = this.axis.options.labels.decimals; var signs_arr = this.axis.options.labels.signs_arr; var dividend = this.axis.options.labels.dividend; var s = Highcharts.numberFormat(this.value / dividend, decimals, ".", ","); s = signs_arr[0] + s + signs_arr[1]; return s.replace(/\$-/g, "-$"); },"rotation":0,"style":{"color":"#000000","fontFamily":"Calibri, Arial, Helvetica, sans-serif","fontWeight":"normal","backgroundColor":"#fff","fontSize":"12px"},"signs_arr":["",""],"decimals":"1","dividend":1},"lineColor":"gray","lineWidth":1,"max":null,"min":90,"minPadding":0.6,"opposite":false,"plotBands":[],"plotLines":[{"value":0,"color":"#c0c0c0","dashStyle":"solid","width":1}],"tickInterval":null,"tickmarkPlacement":"on","tickPosition":"outside","tickColor":"#C0D0E0","tickWidth":1,"title":{"useHTML":false,"text":"Seasonal factors","margin":6,"align":"high","offset":20,"rotation":0,"x":35,"y":-20,"style":{"color":"#000000","fontFamily":"Calibri, Arial, Helvetica, sans-serif","fontWeight":"normal","fontSize":"13px"}},"type":"linear"},"credits":{"href":"/","position":{"align":"left","x":10,"y":-22},"style":{"cursor":"default","color":"#2C2C2C"},"target":"_blank","text":"Click legend items to change data display. Hover over chart to view data.
Source: U.S. Bureau of Labor Statistics.","useHTML":true},"exporting":{"sourceWidth":640,"scale":1,"buttons":{"contextButton":{"enabled":true,"verticalAlign":"bottom","x":-10}}},"saved_values":[{"id":"chart_type_icons","val":"line"},{"id":"chart_id_textinput","val":"chart1"},{"id":"map_type_select","val":"state"},{"id":"map_animated_checkbox","val":false},{"id":"map_color_by_names_checkbox","val":false},{"id":"bubble_animated_checkbox","val":false},{"id":"drilldown_type_select","val":"bar"},{"id":"chart_width_textinput","val":"580"},{"id":"chart_height_textinput","val":"430"},{"id":"top_margin_textinput","val":"100"},{"id":"right_margin_textinput","val":"40"},{"id":"bottom_margin_textinput","val":"80"},{"id":"left_margin_textinput","val":"80"},{"id":"map_spotlight_size_checkbox","val":false},{"id":"map_circle_size_range","val":"10"},{"id":"map_circle_size_by_select","val":"main_values"},{"id":"table_input_load_series_from_icons","val":"column_heads"},{"id":"example_table_select","val":"scatter_with_unique_point_names"},{"id":"table_input_textarea","val":"
Figure 3. Producer Price Index for Regular unleaded gasoline benchmark vs. Final seasonal factors, 2015-2017
DateBenchmarkFinal model

Jan-15

91.092.1

Feb-15

91.195.2

Mar-15

96.1100.0

Apr-15

102.0104.0

May-15

106.3105.9

Jun-15

107.6107.0

Jul-15

106.4104.7

Aug-15

105.9103.1

Sep-15

104.0105.0

Oct-15

100.797.9

Nov-15

97.492.9

Dec-15

92.393.0

Jan-16

91.692.6

Feb-16

91.095.0

Mar-16

95.299.2

Apr-16

101.9103.9

May-16

106.3105.5

Jun-16

107.7106.7

Jul-16

105.8104.1

Aug-16

105.2102.7

Sep-16

103.5104.9

Oct-16

100.198.4

Nov-16

98.394.3

Dec-16

93.693.6

Jan-17

92.193.2

Feb-17

91.594.8

Mar-17

95.098.8

Apr-17

102.3103.8

May-17

106.1105.3

Jun-17

107.2105.9

Jul-17

105.1103.6

Aug-17

104.1102.1

Sep-17

103.3104.7

Oct-17

100.299.0

Nov-17

98.695.2

Dec-17

94.594.2

Source: U.S. Bureau of Labor Statistics, Consumer Expenditure Surveys Public-Use Microdata

"},{"id":"color_palettes","val":-1},{"id":"use_custom_colors_checkbox","val":false},{"id":"custom_colors_textarea","val":"Aqua green CornflowerBlue #FF1493 #A52A2A #FF7F50 rgb(184,134,11) rgb(139,0,139) rgb(255,215,0)\n "},{"id":"series_color_0","val":"7CB5EC"},{"id":"series_type_div_0","val":"line"},{"id":"line_style_select_0","val":"Dash"},{"id":"individual_tooltip_signs_select_0","val":"no_signs"},{"id":"series_decimals_select_0","val":null},{"id":"use_2nd_y_axis_checkbox_0","val":false},{"id":"series_visible_checkbox_0","val":true},{"id":"series_extra_data_title_textarea_0","val":""},{"id":"series_extra_data_values_textarea_0","val":""},{"id":"series_color_1","val":"434348"},{"id":"series_type_div_1","val":"line"},{"id":"line_style_select_1","val":"Solid"},{"id":"individual_tooltip_signs_select_1","val":"no_signs"},{"id":"series_decimals_select_1","val":null},{"id":"use_2nd_y_axis_checkbox_1","val":false},{"id":"series_visible_checkbox_1","val":true},{"id":"series_extra_data_title_textarea_1","val":""},{"id":"series_extra_data_values_textarea_1","val":""},{"id":"legend_layout_select","val":"horizontal"},{"id":"map_legend_enabled_checkbox","val":true},{"id":"map_legend_decimals_select","val":null},{"id":"legend_placement_x","val":"155"},{"id":"legend_placement_y","val":"40"},{"id":"legend_reverse_layout_checkbox","val":false},{"id":"legend_width_input","val":""},{"id":"legend_item_width_input","val":""},{"id":"legend_alphabetical_layout_checkbox","val":false},{"id":"legend_make_toggle_checkbox","val":false},{"id":"chart_x_axis_title_textarea","val":""},{"id":"chart_x_axis_x_position_input","val":"40"},{"id":"chart_x_axis_tickmark_interval_input","val":"6"},{"id":"chart_x_axis_min_input","val":""},{"id":"chart_x_axis_max_input","val":""},{"id":"chart_x_axis_show_only_years","val":false},{"id":"chart_x_axis_add_commas","val":false},{"id":"chart_x_axis_signs_select","val":"no_signs"},{"id":"chart_x_axis_decimals_select","val":null},{"id":"chart_y_axis_title_textarea","val":"Seasonal factors"},{"id":"chart_y_axis_x_position_input","val":"35"},{"id":"chart_y_axis_tickmark_interval_input","val":""},{"id":"chart_y_axis_min_input","val":"90"},{"id":"chart_y_axis_max_input","val":""},{"id":"chart_y_axis_opposite_checkbox","val":false},{"id":"chart_y_axis_log_checkbox","val":false},{"id":"chart_y_axis_signs_select","val":"no_signs"},{"id":"chart_y_axis_decimals_select","val":"1"},{"id":"chart_y_axis_divide_select","val":"1"},{"id":"chart_y_axis_2_enabled_checkbox","val":false},{"id":"chart_y_axis_title_textarea_2","val":""},{"id":"chart_y_axis_x_position_input_2","val":"-75"},{"id":"chart_y_axis_tickmark_interval_input_2","val":"5"},{"id":"chart_y_axis_min_input_2","val":"0"},{"id":"chart_y_axis_max_input_2","val":"100"},{"id":"chart_y_axis_signs_select_2","val":"no_signs"},{"id":"chart_y_axis_decimals_select_2","val":null},{"id":"chart_tooltip_shared_checkbox","val":false},{"id":"chart_tooltip_force_decimals_select","val":"0"},{"id":"chart_tooltip_signs_select","val":"no_signs"},{"id":"chart_tooltip_force_decimals_x_select","val":"0"},{"id":"chart_tooltip_signs_x_select","val":"no_signs"},{"id":"chart_tooltip_force_decimals_z_select","val":"0"},{"id":"chart_tooltip_signs_z_select","val":"no_signs"},{"id":"map_tooltip_main_value_font_size_input","val":"30"},{"id":"map_tooltip_na_text_input","val":"N/A"},{"id":"map_tooltip_prepend_to_value_text_input","val":""},{"id":"chart_z_title_text_input","val":""},{"id":"chart_tooltip_y_multiple_select","val":"1"},{"id":"chart_tooltip_force_decimals_select_2","val":"0"},{"id":"chart_tooltip_signs_select_2","val":"no_signs"},{"id":"chart_tooltip_y_multiple_select_2","val":"1"},{"id":"chart_credits_text_textarea","val":"Click legend items to change data display. Hover over chart to view data.\nSource: U.S. Bureau of Labor Statistics."},{"id":"point_padding_input","val":".1"},{"id":"group_padding_input","val":".2"},{"id":"chart_subtitle_textarea","val":""},{"id":"map_animation_speed_range","val":"500"},{"id":"map_animated_start_at_last_date_checkbox","val":false},{"id":"map_include_puerto_rico_checkbox","val":false},{"id":"map_include_virgin_islands_checkbox","val":false},{"id":"map_add_ranked_columns_checkbox","val":false},{"id":"map_add_state_labels_checkbox","val":false},{"id":"chart_zoom_select","val":"false,false,null"},{"id":"chart_show_data_labels_checkbox","val":false},{"id":"chart_scatter_add_45_line_checkbox","val":false},{"id":"chart_scatter_add_regression_line_checkbox","val":false},{"id":"chart_scatter_highlight_points_select","val":"no_highlight"},{"id":"chart_add_recession_shading_select","val":"no_recession"}]}; var chartCallback = function chartCallback(all_chart_options) { if (all_chart_options.timeline) { //call animation if applicable all_chart_options.timeline.animation(); } $(".highcharts-legend-item").css("min-height", "0px").css("z-index", 100); //fix so CMS CSS doesn't make legend taller than it should $(".highcharts-tooltip").css("z-index", 200); /** * Highcharts plugin for setting a lower opacity for other series than the one that is hovered * in the legend */ (function (Highcharts) { var each = Highcharts.each; Highcharts.wrap(Highcharts.Legend.prototype, 'renderItem', function (proceed, item) { proceed.call(this, item); var isPoint = !!item.series, collection = isPoint ? item.series.points : this.chart.series, groups = isPoint ? ['graphic'] : ['group', 'markerGroup'], element = (this.options.useHTML ? item.legendItem : item.legendGroup).element; element.onmouseover = function () { each(collection, function (seriesItem) { if (seriesItem !== item) { each(groups, function (group) { seriesItem[group].animate({ opacity: 0.25 }, { duration: 150 }); }); } }); }; element.onmouseout = function () { each(collection, function (seriesItem) { if (seriesItem !== item) { each(groups, function (group) { seriesItem[group].animate({ opacity: 1 }, { duration: 50 }); }); } }); }; }); Highcharts.wrap(Highcharts.Chart.prototype, 'showCredits', function (proceed, credits) { proceed.call(this, credits); if (this.credits && credits.target) { this.credits.on('click', function () { $('').attr({ href: credits.href, target: credits.target })[0].click(); }); } }); })(Highcharts); //end gray other series plugin }; Highcharts.setOptions({lang: {thousandsSep: ",", drillUpText: "? Back ", contextButtonTitle: "Download chart image" }}); var chart = new Highcharts.Chart(all_chart_options, chartCallback(all_chart_options)); }); jQuery.fn.extend({addCommas:function addCommas(decimals) { var val = this[0] || 0; if (isNaN(val) || val < 999 && val > -999 && decimals < 1) { //small numbers auto decimals return val; } else if (val < 999 && val > -999 && decimals > 0) { //small numbers fixed decimals return val.toFixed(decimals); } else if ((val > 999 || val < -999) && decimals > 0) { //big numbers fixed decimals val = val.toFixed(decimals); while (/(\d+)(\d{3})/.test(val.toString())) { val = val.replace(/(\d+)(\d{3})/, '$1' + ',' + '$2'); } } else if (val > 999 || val < -999) { //big number auto decimals while (/(\d+)(\d{3})/.test(val.toString())) { val = val.toString().replace(/(\d+)(\d{3})/, '$1' + ',' + '$2'); } } return val; } });