Modulo:Graph/Configurazione

Configurazione del Modulo:Graph.


chart_config = {}

-- ===============================================================
-- Localization of parameter names
-- ===============================================================
chart_config.localization = {
    label = 'etichetta',
    thumb = 'allineamento',
    values = 'valori',
    color = 'colore',
    other = 'altri',
    ring = 'anello',
    name = 'nome',
    internal_legend = 'legenda',
    external_legend = 'legenda esterna',
    nCols = 'colonne legenda',
    other = 'altri',
    color_other = 'colore_altri',
    label_other = 'etichetta_altri',
    normalize = 'normalizza',
    debug_json = 'debug_json',

    -- mappa
    basemap = 'mappa base',
    scale = 'scala',
    projection = 'proiezione',
    defaultValue = 'valore default',
    scaleType = 'tipo scala',
    domainMin = 'minimo dominio',
    domainMax = 'massimo dominio',

    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',
    xAxisPrimaryTicks = 'tacche asse x',
    yAxisPrimaryTicks = 'tacche asse y',
    xAxisPrimaryTicksNumber = 'n tacche asse x',
    yAxisPrimaryTicksNumber = 'n tacche asse y',
    xAxisSecondaryTicks = 'n tacche secondarie asse x',
    yAxisSecondaryTicks = 'n tacche secondarie asse y',

    x = 'x',
    y = 'y',
    yTitle = 'titolo y',
    colors = 'colori',
    alpha = 'alfa',
    colorsByGroup = 'colori per gruppo x',
    showValue = 'mostra valori',
    formatValue = 'formatta valori',

    strokeThickness = 'spessore linea',
    NoTracking = {'nocat'}
}

-- ===============================================================
-- List of interpolate options
-- ===============================================================
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 }

-- ===============================================================
-- List of "yes" values
-- ===============================================================
chart_config.yes_values = { s=true, ['sì']=true, si=true, y=true, yes=true}

-- ===============================================================
-- List of "no" values
-- ===============================================================
chart_config.no_values = { n=true, no=true}

-- ===============================================================
-- Localization of list and decimal point separator
-- ===============================================================
chart_config.separator = { decimal = "," , list = ";" }

-- ===============================================================
-- List of symbols for mark on line chart
-- ===============================================================
chart_config.symbols = {square= true, cross=true, diamond=true, ['triangle-up']=true, ['triangle-down']=true}

-- ===============================================================
-- Localization of list and decimal point separator
-- ===============================================================
chart_config.separator = { decimal = "," , list = ";" }

-- ===============================================================
-- Localizzazione dei nomi dei parametri
-- Default colors from https://github.com/mbostock/d3/wiki/Ordinal-Scales#categorical-colors
-- include color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/)
-- ===============================================================
chart_config.colors_palette = {
    category10 = { 10, { '#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd',
                         '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'}
                 },
    category20 = { 20, { '#1f77b4', '#aec7e8', '#ff7f0e', '#ffbb78', '#2ca02c',
                         '#98df8a', '#d62728', '#ff9896', '#9467bd', '#c5b0d5',
                         '#8c564b', '#c49c94', '#e377c2', '#f7b6d2', '#7f7f7f',
                         '#c7c7c7', '#bcbd22', '#dbdb8d', '#17becf', '#9edae5'}
                 },
    greenhue = { 7,    { '#c7e9c0', '#a1d99b', '#74c476', '#41ab5d', '#238b45',
                         '#006d2c', '#00441b'}
                },
    orangehue = {7,    { '#fdd0a2', '#fdae6b', '#fd8d3c', '#f16913', '#d94801',
                         '#a63603', '#7f2704'}
                },
    bluehue =   { 9,     { '#f7fcf0', '#e0f3db', '#ccebc5', '#a8ddb5', '#7bccc4',
                         '#4eb3d3', '#2b8cbe', '#0868ac', '#084081' }
                },
    blue_brown = { 10,  { '#543005', '#8c510a', '#bf812d', '#dfc27d', '#f6e8c3',
                          '#c7eae5', '#80cdc1', '#35978f', '#01665e', '#003c30', }
                },
    brown_violet = {10, { '#7f3b08', '#b35806', '#e08214', '#fdb863', '#fee0b6',
                          '#d8daeb', '#b2abd2', '#8073ac', '#542788', '#2d004b', }
                },
    red_blue = { 10,    { '#a50026', '#d73027', '#f46d43', '#fdae61', '#fee08b',
                          '#d9ef8b', '#a6d96a', '#66bd63', '#1a9850', '#006837', }
               }
    }

-- ===============================================================
-- Default values for chart
-- ===============================================================
chart_config.default = {
    width = 400,
    height = 200,
    width_piechart = 200,
    background_color = white,
    yGrid = true,
    xGrid = false,
    symbol = "square",
    symbol_size = 20,
    stroke_thickness = 2,
    base_map_directory = "Modulo:Chart/",
    world_map = "WorldMap-iso2.json"
}

-- ===============================================================
-- List of value for line graph
-- ===============================================================
chart_config.graph_type = {
    line = {"line", false},
    area = {"area", false},
    rect = {"rect", false},
    stackedline = {"line", true},
    stackedarea = {"area", true},
    stackedrect = {"rect", true},
    linea = {"line", false},
    istogramma = {"rect", false},
    ['linea cumulativa'] = {"line", true},
    ['area cumulativa'] = {"area", true},
    ['istogramma cumulativo'] = {"rect", true},
}

-- ===============================================================
-- Do no categorize for errors this namespace
-- ===============================================================
chart_config.uncategorized_namespaces = {
    Utente = true,
    Discussioni_utente = true,
    Discussione = true,
    Discussioni_modulo = true,
    Discussioni_template = true };

-- ===============================================================
-- Name of error category to use
-- ===============================================================
chart_config.errors_category = 'Errori di compilazione di un template grafico'

-- ===============================================================
-- List of errors messages
-- ===============================================================
chart_config.errors_key = {
    type_unknown = "Tipo di grafico %s non riconosciuto",
    value_not_valid = 'Valore per %s "%s" non valido',
    no_values = 'Non sono stati trovati valori da mostrare',
    unknown_error = "Errore non riconosciuto"
}

return chart_config