Style Chart

by solcursomapea

HTML

<link rel="stylesheet" href="https://mapea4-sigc.juntadeandalucia.es/assets/css/mapea.ol.min.css">
<script src="https://sigc.desarrollo.guadaltel.es/mapea42_dev/js/mapea.ol.min.js"></script>
<script src="https://mapea4-sigc.juntadeandalucia.es/js/configuration.js"></script>
<div id="map">
</div>

CSS

html,
 body {
   margin: 0;
   padding: 0;
   height: 100%;
   overflow: hidden;
 }

JavaScript

var mapajs = M.map({
  'container': 'map',
  "controls": ["layerswitcher", "mouse", "scale", "overviewmap", "panzoombar", "scaleline", ],
  "getfeatureinfo": "plain",
});


var ayuntamientos = new M.layer.WFS({
  name: "assda_sv10_ayuntamiento_point_indicadores",
  url: "https://clientes.guadaltel.es/desarrollo/geossigc/wfs?",
  namespace: "mapea",
  name: "assda_sv10_ayuntamiento_point_indicadores",
  legend: "Prestaciones - Ámbito municipal",
  getfeatureinfo: "plain",
  geometry: 'POINT',
  extract: true,
});


let optionsChartNoTexto = {
  type: 'pie',
  donutRatio: 0.5,
  radius: 25,
  offsetX: 0,
  offsetY: 0,
  stroke: {
    color: 'white',
    width: 1
  },
  animation: true,
  scheme: M.style.chart.schemes.Custom,
  rotateWithView: true,
  fill3DColor: '#CC33DD',
  variables: [{
    attribute: 's0303',
    legend: 'Prestaciones PEAP',
    fill: 'cyan',
    /*label: {
       text: function(value, values, feature) {
       return value.toString();
      },
      radiusIncrement: 10,
      stroke: {
        color: '#000',
        width: 2
      },
      fill: 'cyan',
      font: 'Comic Sans MS',
      scale: 1.25
    } */
  }, {
    attribute: 's0304',
    legend: 'Prestaciones PECEF',
    fill: 'blue',
    /* label: {
       text: function(value, values, feature) {
       return value.toString();
      },
      radiusIncrement: 10,
      stroke: {
        color: '#000',
        width: 2
      },
      fill: 'cyan',
      font: 'Comic Sans MS',
      scale: 1.25
    } */
  }, {
    attribute: 's0305',
    legend: 'Prestaciones PEVS',
    fill: 'pink',
    /* label: {
       text: function(value, values, feature) {
       // return new String(value).toString();
			 return value.toString();
      },
      radiusIncrement: 10,
      stroke: {
        color: '#000',
        width: 2
      },
      fill: 'cyan',
      font: 'Comic Sans MS',
      scale: 1.25
    } */
  }, {
    attribute: 's0306',
    legend: 'Prestaciones SAD',
    fill: 'red',
    /* label: {
...