{"renderer":{"visualVariables":[{"type":"transparencyInfo","valueExpression":"// Escribe una secuencia de comandos que devuelve un valor que se utilizará para dibujar entidades.\n// Por ejemplo, buscar el porcentaje de hombres:\n// Round(($feature.MalePop / $feature.TotalPop) * 100, 2)\n\n\n\nvar groups = [\n$feature.Ciutadans,\n$feature.JuntsperCatalunya,\n$feature.EsquerraRepublicanaCatalunya,\n$feature.PartitdelsSocialistesdeCataluny, \n$feature.CatalunyaenComúPodem,\n$feature.candidaturadUnitatPopular,\n$feature.PartitPopular,\n$feature.PartitAnimalistacontraelMaltrac,\n$feature.RecortesCeroGrupoVerde, \n$feature.PerunMonMesJust,\n$feature.DialegRepublica\n];\n\n\nvar winner = Max(groups);\nvar total = $feature[\"Cens_electoral\"];\nreturn (winner/total) * 100;\n","valueExpressionTitle":"Grado de Predominancia","stops":[{"value":26,"transparency":70},{"value":43,"transparency":0}]}],"authoringInfo":{"colorRamp":{"type":"multipart","colorRamps":[{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[231,252,207,255],"toColor":[231,252,207,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[210,179,252,255],"toColor":[210,179,252,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[252,184,179,255],"toColor":[252,184,179,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[199,229,252,255],"toColor":[199,229,252,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[252,192,227,255],"toColor":[252,192,227,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[187,252,239,255],"toColor":[187,252,239,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[184,252,184,255],"toColor":[184,252,184,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[252,227,207,255],"toColor":[252,227,207,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[227,210,252,255],"toColor":[227,210,252,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[233,252,179,255],"toColor":[233,252,179,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[252,179,250,255],"toColor":[252,179,250,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[252,215,227,255],"toColor":[252,215,227,255]},{"type":"algorithmic","algorithm":"esriCIELabAlgorithm","fromColor":[184,199,252,255],"toColor":[184,199,252,255]}]},"visualVariables":[{"type":"transparencyInfo","minSliderValue":16.949152542372879,"maxSliderValue":68.085106382978722}]},"type":"uniqueValue","fieldDelimiter":",","valueExpression":"var groups = [\n{ value: $feature.Ciutadans, alias:\"Ciutadans-Partido de la Ciudadanía (Cs)\"},\n{ value: $feature.JuntsperCatalunya, alias:\"Junts per Catalunya (JUNTSxCAT)\"},\n{ value: $feature.EsquerraRepublicanaCatalunya, alias:\"Esquerra Republicana-Catalunya Sí (ERC-CatSí)\"},\n{ value: $feature.PartitdelsSocialistesdeCataluny, alias:\"Partit dels Socialistes de Catalunya (PSC-PSOE)\"}, \n{ value: $feature.CatalunyaenComúPodem, alias:\"Catalunya en Comú-Podem (CatComú-Podem)\"},\n{ value: $feature.candidaturadUnitatPopular, alias:\"Candidatura dUnitat Popular (CUP)\"},\n{ value: $feature.PartitPopular, alias:\"Partit Popular/Partido Popular (PP)\"},\n{ value: $feature.PartitAnimalistacontraelMaltrac, alias:\"Partit Animalista Contra el Maltractament Animal (PACMA)\"},\n{ value: $feature.RecortesCeroGrupoVerde, alias:\"Recortes Cero-Grupo Verde (Recortes Cero-Grupo Verde)\"},\n{ value: $feature.PerunMonMesJust, alias:\" Per Un Món Més Just (PUM+J)\"},\n{ value: $feature.DialegRepublica, alias:\"Diàleg Republicà (Diàleg)\"}\n \n];\n\nfunction getPredominantCategory(fieldsArray){\n var maxValue = -Infinity;\n var maxCategory = \"\";\n for(var k in fieldsArray){\n if(fieldsArray[k].value > maxValue){\n maxValue = fieldsArray[k].value;\n maxCategory = fieldsArray[k].alias;\n } else if (fieldsArray[k].value == maxValue){\n maxCategory = maxCategory + \"/\" + fieldsArray[k].alias;\n }\n }\n return IIF(maxValue <= 0, null, maxCategory);\n}\n\ngetPredominantCategory(groups);","valueExpressionTitle":"Partido más votado","defaultSymbol":{"color":[130,130,130,255],"outline":{"color":[110,110,110,255],"width":0.7,"type":"esriSLS","style":"esriSLSSolid"},"type":"esriSFS","style":"esriSFSSolid"},"defaultLabel":"","uniqueValueInfos":[{"symbol":{"color":[255,170,0,255],"outline":{"color":[110,110,110,255],"width":0.3,"type":"esriSLS","style":"esriSLSSolid"},"type":"esriSFS","style":"esriSFSSolid"},"value":"Ciutadans-Partido de la Ciudadanía (Cs)","label":"Ciutadans-Partido de la Ciudadanía (Cs)"},{"symbol":{"color":[255,85,0,255],"outline":{"color":[110,110,110,255],"width":0.3,"type":"esriSLS","style":"esriSLSSolid"},"type":"esriSFS","style":"esriSFSSolid"},"value":"Esquerra Republicana-Catalunya Sí (ERC-CatSí)","label":"Esquerra Republicana-Catalunya Sí (ERC-CatSí)"},{"symbol":{"color":[252,187,187,255],"outline":{"color":[110,110,110,255],"width":0.3,"type":"esriSLS","style":"esriSLSSolid"},"type":"esriSFS","style":"esriSFSSolid"},"value":"Junts per Catalunya (JUNTSxCAT)","label":"Junts per Catalunya (JUNTSxCAT)"},{"symbol":{"color":[255,0,0,255],"outline":{"color":[110,110,110,255],"width":0.7,"type":"esriSLS","style":"esriSLSSolid"},"type":"esriSFS","style":"esriSFSSolid"},"value":"Partit dels Socialistes de Catalunya (PSC-PSOE)","label":"Partit dels Socialistes de Catalunya (PSC-PSOE)"}]},"transparency":0}
HasZ: false
HasM: false
Has Attachments: false
Has Geometry Properties: true
HTML Popup Type: esriServerHTMLPopupTypeAsHTMLText