Siniestros y siniestralidad
Highcharts.chart(‘container’, {
chart: {
zoomType: ‘xy’
},
title:””,
xAxis: [{
categories: [‘2012’, ‘2013’, ‘2014’, ‘2015’, ‘2016’, ‘2017’,
‘2018’, ‘2019’, ‘2020’, ‘2021’, ‘jun-21’, ‘jun-22’],
crosshair: true
}],
yAxis: [{ // Primary yAxis
labels: {
format: ‘{value}%’,
style: {
color: Highcharts.getOptions().colors[1]
}
},
title: {
text: ‘Siniestralidad’,
style: {
color: Highcharts.getOptions().colors[1]
}
}
}, { // Secondary yAxis
title: {
text: ‘Siniestros (Mill$)’,
style: {
color: Highcharts.getOptions().colors[0]
}
},
labels: {
format: ‘{value} mm’,
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.defaultOptions.legend.backgroundColor || // theme
‘rgba(255,255,255,0.25)’
},
series: [{
name: ‘Siniestros (Mill$)’,
type: ‘column’,
yAxis: 1,
data: [238.8,238.9,266.5,331.0,321.0,314.9,321.2,362.3,353.8,472.3,212.2,225.4],
tooltip: {
valueSuffix: ”,
valuepreffix: ‘$’
}
}, {
name: ‘Siniestrallidad’,
type: ‘spline’,
data: [47.5,43.7,46.6,54.4,51.7,50.2,48.8,51.6,49.0,57.3,52.1,51.1],
tooltip: {
valueSuffix: ‘%’
}
}]
});
Cifras por ramos
Highcharts.chart(‘container’, {
data: {
table: ‘datatable’
},
chart: {
type: ‘column’
},
colors:[“#2B516E”,”#BEE3FF”],
title: “”,
yAxis: {
allowDecimals: false,
title: {
text: ‘Units’
}
},
tooltip: {
formatter: function () {
return ‘‘ + this.series.name + ‘
‘ +
this.point.y + ‘ Millones en ‘ + this.point.name.toLowerCase();
}
}
});
Cifras generales
// Create the chart
Highcharts.chart(‘container’, {
chart: {
type: ‘column’
},
accessibility: {
announceNewData: {
enabled: true
}
},
title:””,
colors: [‘#BEE3FF’],
xAxis: {
type: ‘category’
},
yAxis: {
title: {
text: ‘Total percent market share’
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
format: ‘${point.y:.1f}’
}
}
},
tooltip: {
headerFormat: ‘{series.name}
‘,
pointFormat: ‘{point.name}: ${point.y:.2f} of total
‘
},
series: [
{
name: “Años”,
colorByPoint: true,
data: [
{
name: “2012”,
y: 502.9,
drilldown: “2012”
},
{
name: “2013”,
y: 546.1,
drilldown: “2013”
},
{
name: “2014”,
y: 571.8,
drilldown: “2014”
},
{
name: “2015”,
y: 608.6,
drilldown: “2015”
},
{
name: “2016”,
y: 620.9,
drilldown: “2016”
},
{
name: “2017”,
y: 626.8,
drilldown: “2017”
},
{
name: “2018”,
y: 657.5,
drilldown: “2018”
},
{
name: “2019”,
y: 702,
drilldown: “2019”
},
{
name: “2020”,
y: 721.65,
drilldown: “2020”
},
{
name: “2021”,
y: 824.29,
drilldown: “2021”
},
{
name: “jun- 21”,
y: 407.62,
drilldown: “jun- 21″
},
{
name:”jun-22″,
y:440.63,
drilldown:”jun-22″
},
{
name:”2023″,
y:440.63,
drilldown:”2023”
}
]
}
],
});
Leer más