$(function() {Highcharts.setOptions({global: {useUTC: false},lang : {months : ['Януари','Февруари','Март','Април','Май','Юни','Юли','Август','Септември','Октомври','Ноември','Декември'],shortMonths : ['Яну','Фев','Мар','Апр','Май','Юни','Юли','Авг','Сеп','Окт','Ное','Дек'],rangeSelectorFrom: 'Oт',rangeSelectorTo: 'До',weekdays: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],ecimalPoint: ".",downloadPNG: "Download PNG image",downloadJPEG: "Download JPEG image",downloadPDF: "Download PDF document",downloadSVG: "Download SVG vector image",exportButtonTitle: "Export to raster or vector image",loading: 'Loading...',printButtonTitle: "Print the chart",rangeSelectorZoom: 'Видимост',resetZoom: 'Reset',resetZoomTitle: 'Видимост 1:1',thousandsSep: " "},colors: ['#e7a70b','#89A54E', '#AA4643', '#80699B', '#3D96AE', '#DB843D', '#92A8CD', '#A47D7C', '#B5CA92'],rangeSelector: {inputDateFormat: '%e %b %Y'}});var mychart;$.getJSON('/index_json.php', function(data) {/* Create the chart */mychart = new Highcharts.StockChart({chart : {renderTo : 'container',borderColor: "#ff0000",zoomType: 'x',panning: true,panKey: 'shift',events: { load: onchartload}},legend: { enabled: true, layout: 'horizontal', align: 'center', verticalAlign: 'bottom' },rangeSelector : { buttons: [{type: 'week',count: 1,text: '1 сед'}, {type: 'month',count: 1,text: '1 мес'}, {type: 'month',count: 3,text: '3 мес'}, {type: 'month',count: 6,text: '6 мес'}, {type: 'year',count: 1,text: '1y'}, {type: 'all',text: 'All'}], buttonTheme: { width: 60 }, selected: 0 },/*title : {text : 'Злато 14к лв./гр., Тройунция, Долар'},*/plotOptions: {series: {pointIntervalUnit: 'month'}}, yAxis: [{labels: {enabled:false},endOnTick: false,maxPadding: 0.005},{labels: {enabled:false},endOnTick: false,maxPadding: 0.005},{labels: {enabled:false},endOnTick: false,maxPadding: 0.005}],xAxis: [{ labels: {rotation: 90,step: 1,style: { /* color: 'red' */ } }, tickPixelInterval: 50},{ linkedTo:0,step: 1, opposite:true,labels: {rotation: 0,formatter: function () {daya = ['Нд','Пн','Вт','Ср','Чт','Пт','Ст'];date = new Date(this.value); return daya[date.getDay()]; } },tickPixelInterval: 50 }],series : [{name: 'Злато 14к. лв./гр.',data : data.gold14,type : 'area',lineWidth: 2,lineWidth: 2,threshold : null,states: {hover: {enabled: true,lineWidth: 4}},tooltip: {backgroundColor: "rgba(255,255,255,.90)",borderWidth: 1,pointFormat : 'Злато 14 карата {point.y}лв./гр
'}/*,fillColor : {linearGradient : {x1: 0, y1: 0, x2: 0, y2: 1},stops : [[0, 'rgba(241,244,21,1)'],[1, 'rgba(255,242,106,0.3)']]}*/},{data : data.USD,name: '$ Курс на долар',type : 'line',lineWidth: 1,threshold : null,yAxis: 2,states: {hover: {enabled: true,lineWidth: 4}},tooltip: {backgroundColor: "rgba(255,255,255,.90)",borderWidth: 1,pointFormat : '$1 = {point.y}лв.
'}},{data : data.gold,type : 'line',lineWidth: 1,threshold : null,name: 'Злато 24к. долар / тройунция',yAxis: 1,states: {hover: {enabled: true,lineWidth: 4}},threshold : null,tooltip: {backgroundColor: "rgba(255,255,255,.90)",borderWidth: 1,pointFormat : 'Злато XAU ${point.y} за тройунция
'}}]});});});