Modulo:Graph/sandbox/Configurazione

chart_config = {}

-- ===============================================================
-- Localizzazione dei nomi dei parametri
-- ===============================================================
chart_config.localization = {
    label = 'etichetta',  
    show_label =  'mostra_etichetta',
    thumb = 'allineamento',
    value = 'valore',
    color = 'colore',
    caption = 'didascalia',
    other = 'altri',
    radius = 'raggio',
    name = 'nome',
    internal_legend = 'legenda interna',
    other = 'altri',
    color_other = 'colore_altri',
    label_other = 'etichetta_altri',
    normalize = 'normalizza',
    debug_json = 'debug_json',

    basemap = 'mappa base',
    scale = 'scala',
    projection = 'proiezione',
    defaultValue = 'default',
    scaleType = 'tipo scala',
    domainMin = 'minimo dominio',
    domainMax = 'massimo dominio',
    colorScale = 'scala colori',
    width = 'larghezza',
    height = 'altezza',
    type = 'tipo',
    interpolate = 'interpolazione',
    symbols = 'simboli',
    symbolSize = 'dimensione simboli',

    -- Axes parameters
    xAxisTitle = 'titolo asse x',
    yAxisTitle = 'titolo asse y',
    xAxisMin = 'minimo asse x',
    xAxisMax = 'massimo asse x',
    yAxisMin = 'minimo asse y',
    yAxisMax = 'massimo asse y',
    xAxisFormat = 'formato asse x',
    yAxisFormat = 'formato asse y',
    xGrid = 'griglia asse x',
    yGrid = 'griglia asse y',
    xAxisPrimaryThick = 'tacche asse x',
    yAxisPrimaryThick = 'tacche asse y',
    xAxisPrimaryThickNumber = 'n tacche asse x',
    yAxisPrimaryThickNumber = 'n tacche asse y',
    xAxisSecondaryThick = 'tacche secondarie asse x',
    yAxisSecondaryThick = 'tacche secondarie asse y',

    yTitle = 'titolo y#',
    colors = 'colori',
    strokeThickness = 'spessore linee',
    NoTracking = {'nocat'}
}

chart_config.interpolate = { monotone= true, linear= true, ['step-before']= true, ['step-after']= true,
                             basis= true, ['basis-open']= true, ['basis-closed']= true, bundle= true,
                             cardinal= true, ['cardinal-open']= true, ['cardinal-closed']= true }

chart_config.yes_values = { s=true, ['sì']=true, si=true, y=true, yes=true}
chart_config.no_values = { n=true, no=true}

chart_config.symbols = {square= true, cross=true, diamond=true, ['triangle-up']=true, ['triangle-down']=true}

chart_config.separator = { decimal = "," , list = ";" }

-- Default colors from https://github.com/mbostock/d3/wiki/Ordinal-Scales#categorical-colors
chart_config.colors_palette = {
    category10 = {
                    '1f77b4', 'ff7f0e', '2ca02c', 'd62728', '9467bd',
                   '8c564b', 'e377c2', '7f7f7f', 'bcbd22', '17becf'
                 },
    category20 = {
                   '1f77b4', 'aec7e8', 'ff7f0e', 'ffbb78', '2ca02c',
                   '98df8a', 'd62728', 'ff9896', '9467bd', 'c5b0d5',
                   '8c564b', 'c49c94', 'e377c2', 'f7b6d2', '7f7f7f',
                   'c7c7c7', 'bcbd22', 'dbdb8d', '17becf', '9edae5'
                 }
}

chart_config.default = {
    width = 400,
    height = 200,
    padding_left = 5,
    padding_right = 5,
    padding_top = 5,
    padding_bottom = 5,
    padding_left = 5,
    background_color = white,
    yGrid = true,
    xGrid = false,
    symbol = "square",
    symbol_size = 20,
    radius = 95
}

chart_config.uncategorized_namespaces = {
    Utente = true,  
    Discussioni_utente = true,  
    Discussione = true,  
    Discussioni_modulo = true,  
    Discussioni_template = true };

chart_config.graph_alias = {
    linea = 'line',
    area = 'area' ,
    istogramma = 'rect',
    cumulativo = 'stacked'
}

chart_config.graph_type = {
    line = true,
    area = true,
    rect = true
}

chart_config.errors_category = 'Errori di compilazione del template Grafico a linee'

return chart_config