ureech,
Ваш пример:
var chart1, chart2;
// Once DOM (document) is finished loading
$(document).ready(function() {
// First chart initialization
chart1 = new Highcharts.Chart({
chart: {
renderTo: 'chart_1',
type: 'line',
height: 350,
},
title: {
text: 'Изменение размеров шеи,талии и бёдер за 10 недель в %'
},
xAxis: {
categories: [1,2,3,4,5,6,7,8,9,10]
},
yAxis: {
title: {
text: 'Interviewed'
}
},
series: [{
name: 'Талия',
data: [5, 10, 20, 22, 25, 28, 30, 40, 80, 90]
}, {
name: 'Бёдра',
data: [15, 15, 18, 40, 30, 25, 60, 60, 80, 70]
}, {
name: 'Шея',
data: [1, 3, 6, 0, 50, 25, 50, 60, 30, 100]
}]
});
То же самое с данными из строки:
var chart1, chart2;
var legs = "15, 15, 18, 40, 30, 25, 60, 60, 80, 70";
// Once DOM (document) is finished loading
$(document).ready(function() {
// First chart initialization
chart1 = new Highcharts.Chart({
chart: {
renderTo: 'chart_1',
type: 'line',
height: 350,
},
title: {
text: 'Изменение размеров шеи,талии и бёдер за 10 недель в %'
},
xAxis: {
categories: [1,2,3,4,5,6,7,8,9,10]
},
yAxis: {
title: {
text: 'Interviewed'
}
},
series: [{
name: 'Талия',
data: [5, 10, 20, 22, 25, 28, 30, 40, 80, 90]
}, {
name: 'Бёдра',
data: legs.split(",")
}, {
name: 'Шея',
data: [1, 3, 6, 0, 50, 25, 50, 60, 30, 100]
}]
});