Last active
December 19, 2016 17:04
-
-
Save macndesign/77cba4c8fd159457a7fbd142e71f68df to your computer and use it in GitHub Desktop.
Chart data analisys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Dados após clicar em aplicar (Despesas por funções) | |
const valueFunctions = [ | |
{"value": "adm", "label": "Administração"}, | |
{"value": "jud", "label": "Judiciária"} | |
]; | |
const valueYears = [ | |
{"value": 2007, "label": 2007}, | |
{"value": 2010, "label": 2010} | |
]; | |
const valueGroups = [ | |
{"value": "initial_allocation", "label": "Dotação Inicial"}, | |
{"value": "deflated_initial_allocation", "label": "Dotação Inicial Deflacionada"} | |
]; | |
const expensesData = { | |
"count": 3, | |
"next": null, | |
"previous": null, | |
"results": [ | |
{ | |
"id": 1, | |
"period": "http://localhost:8000/api/period/2/", | |
"get_period": {"id": 2,"year": 2010}, | |
"function": "jud", | |
"initial_allocation": "5000.00", | |
"deflated_initial_allocation": "1000.00", | |
"committed": "3000.00", | |
"committed_deflated": "2000.00" | |
},{ | |
"id": 2, | |
"period": "http://localhost:8000/api/period/3/", | |
"get_period": {"id": 3, "year": 2007}, | |
"function": "jud", | |
"initial_allocation": "4500.00", | |
"deflated_initial_allocation": "3500.00", | |
"committed": "2500.00", | |
"committed_deflated": "1500.00" | |
},{ | |
"id": 6, | |
"period": "http://localhost:8000/api/period/2/", | |
"get_period": {"id": 2, "year": 2010}, | |
"function": "adm", | |
"initial_allocation": "1200.00", | |
"deflated_initial_allocation": "3000.00", | |
"committed": "2000.00", | |
"committed_deflated": "3400.00" | |
} | |
] | |
}; | |
// Helpers | |
export const enumFunctions = { | |
leg: 'Legislativa', | |
jud: 'Judiciária', | |
ess: 'Essencial à Justiça', | |
adm: 'Administração', | |
seg: 'Segurança Pública', | |
ass: 'Assistência Social', | |
pre: 'Previdência Social', | |
sau: 'Saúde', | |
tra: 'Trabalho', | |
edu: 'Educação', | |
cul: 'Cultura', | |
dir: 'Direitos da cidadania', | |
urb: 'Urbanismo', | |
hab: 'Habitação', | |
san: 'Saneamento', | |
ges: 'Gestão Ambiental', | |
cie: 'Ciência e Tecnologia', | |
agr: 'Agricultura', | |
org: 'Organização Agrária', | |
ind: 'Industria', | |
cse: 'Comércio e Serviços', | |
com: 'Comunicações', | |
ene: 'Energia', | |
trn: 'Transporte', | |
des: 'Desporto e Lazer', | |
enc: 'Encargos Especiais' | |
}; | |
export const enumGroups = [ | |
{value: 'initial_allocation', label: 'Dotação Inicial'}, | |
{value: 'deflated_initial_allocation', label: 'Dotação Inicial Deflacionada'}, | |
{value: 'committed', label: 'Empenhado'}, | |
{value: 'committed_deflated', label: 'Empenhado Deflacionado'} | |
]; | |
// Objeto a ser montado após aplicar configurações | |
export const expensesByFunctions = { | |
chart: { | |
renderTo: "expense-chart-container", | |
type: "column" | |
}, | |
title: { | |
text: 'Despesas por Funções' | |
}, | |
series: [{ | |
name: "2007", | |
// [ Judiciário ] | |
// dotInici dotInDef | |
data: [4500.00, 3500.00] | |
}, { | |
name: "2010", | |
// [ Judiciário ] [ Administração ] | |
// dotInici dotInDef dotInic dotInDef | |
data: [5000.00, 1000.00, 1200.00, 3000.00] | |
}], | |
xAxis: { | |
categories: [{ | |
name: "Judiciário", | |
categories: ["Dotação Inicial", "Dotação Inicial Deflacionado"] | |
}, { | |
name: "Administração", | |
categories: ["Dotação Inicial", "Dotação Inicial Deflacionado"] | |
}] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment