diff --git a/locales/en.json b/locales/en.json new file mode 100644 index 00000000..7c7fa5da --- /dev/null +++ b/locales/en.json @@ -0,0 +1,364 @@ +{ + "visualOptions": { + "marginTop": "Margin (top)", + "marginRight": "Margin (right)", + "marginBottom": "Margin (bottom)", + "marginLeft": "Margin (left)", + "nodesWidth": "Nodes width", + "nodesPadding": "Padding", + "linksOpacity": "Links opacity (0-1)", + "linksBlendMode": "Links blend mode", + "sortNodesBy": "Sort nodes by", + "sortNodesByOptions": { + "sizeDescending": "Size (descending)", + "sizeAscending": "Size (ascending)", + "name": "Name", + "auto": "Minimize Overlaps" + }, + "verticalAlignment": "Flows alignment", + "colorScale": "Color scale", + "showValues": "Show nodes values", + "minDiameter": "Min diameter", + "maxDiameter": "Max diameter", + "linkOpacity": "Links opacity (0-1)", + "sameSide": "Arcs only on the top", + "nodeSize": "Nodes diameter", + "nodeSizeOptions": { + "default": "Same size", + "totalValue": "Weighted degree", + "inValue": "Weighted inDegree", + "outValue": "Weighted outDegree", + "degree": "Links count", + "outDegree": "OutDegree", + "inDegree": "InDegree" + }, + "orderNodesBy": "Sort nodes by", + "showLegend": "Show legend", + "legendWidth": "Legend width", + "padding": "Padding", + "barsOrientation": "Bars orientation", + "barsOrientationOptions": { + "vertical": "Vertically", + "horizontal": "Horizontally" + }, + "sortBarsBy": "Sort bars by", + "sortBarsByOptions": { + "totalDescending": "Size (descending)", + "totalAscending": "Size (ascending)", + "name": "Name", + "original": "Original" + }, + "useSameScale": "Use same scale", + "columnsNumber": "Number of columns", + "sortSeriesBy": "Sort series by", + "showSeriesLabels": "Show series titles", + "repeatAxesLabels": "Repeat axis labels for each series", + "showSeriesGrid": "Show series grid", + "setsPadding": "Padding between sets", + "barsPadding": "Padding between bars", + "SortXAxisBy": "Sort X axis by", + "sortSeriesByOptions": { + "valueDescending": "Total value (descending)", + "valueAscending": "Total value (ascending)", + "name": "Name", + "none": "Original", + "nameAscending": "Name" + }, + "stacksPadding": "Padding", + "stacksOrder": "Sort stacks by", + "nodePadding": "Padding", + "sortGroupsBy": "Sort groups by", + "labelStyles": "Label", + "labelStylesOptions": { + "labelPrimary": "Primary", + "labelSecondary": "Secondary", + "labelItalic": "Italic" + }, + "showLabelsOutline": "Show outline", + "autoHideLabels": "Auto hide labels", + "barsWidth": "Bars width", + "iqrMultiplier": "Interquartile range multiplier", + "dotsDiameter": "Dots diameter", + "yOrigin": "Set Y origin to 0", + "showBoxPlots": "Show boxpot values", + "xOrigin": "Set X origin to 0", + "showStroke": "Show stroke", + "showDotsOnData": "Show dots on data values", + "interpolation": "Curves type", + "interpolationOptions": { + "curveBasis": "Basis", + "curveCardinal": "Cardinal", + "curveCatmullRom": "Catmull–Rom", + "curveLinear": "Linear", + "curveMonotoneX": "Monotone X", + "curveNatural": "Natural", + "curveStep": "Step", + "curveStepAfter": "Step After", + "curveStepBefore": "Step Before", + "Basis": "Basis", + "Bundle": "Bundle", + "Cardinal": "Cardinal", + "CatmullRom": "Catmull–Rom", + "Linear": "Linear", + "MonotoneX": "Monotone X", + "Natural": "Natural", + "Step": "Step", + "StepAfter": "Step After", + "StepBefore": "Step Before" + }, + "streamsOffset": "Streams vertical alignment", + "streamsOffsetOptions": { + "stackOffsetExpand": "Expand", + "stackOffsetSilhouette": "Silhouette", + "stackOffsetNone": "None", + "stackOffsetWiggle": "Wiggle" + }, + "streamsPadding": "Padding", + "showYAxis": "Show Y axis", + "showStreams": "Show streams labels", + "labelsType": "Labels position", + "sortCirclesBy": "Sort circles by", + "sortCirclesByOptions": { + "descending": "Size (descending)", + "ascending": "Size (ascending)", + "original": "Original" + }, + "showHierarchyLabels": "Show hierarchy labels", + "hierarchyLabelsStyle": "Hierarchy labels position", + "hierarchyLabelsStyleOptions": { + "onPath": "On path", + "onPoint": "On point" + }, + "layout": "Layout algorythm", + "sortBy": "Sort nodes by", + "sizeOnlyLeaves": "Size only leaf nodes", + "hierarchyStyle": "Hierarchy labels", + "hierarchyStyleOptions": { + "labelPrimary": "Primary", + "labelSecondary": "Secondary", + "labelItalic": "Italic" + }, + "bandwidth": "Bandwidth", + "showBandLabels": "Show band labels", + "labelThresholds": "Labels threshold steps", + "groupStrokeWidth": "Groups stroke width", + "groupOpacity": "Fill opacity", + "sortGroupsByOptions": { + "": "Original", + "ascending": "Start date (ascending)", + "descending": "Start date (descending)", + "group": "Name", + "valueDescending": "Total value (descending)", + "valueAscending": "Total value (ascending)", + "name": "Name", + "none": "Original" + }, + "barPadding": "Padding (%)", + "alignLabels": "Labels position", + "diameter": "Bin diameter", + "weightSize": "Scale hexagons area", + "showCountLabels": "Show count labels", + "bands": "Number of bands", + "curveType": "Curve type", + "negativeStyle": "Show negative values as", + "negativeStyleOptions": { + "mirrored": "Mirrored", + "top": "Offset" + }, + "xTicksAuto": "Auto-place ticks on x axis", + "xTicksAmount": "Max. ticks on x axis", + "xTicksOuter": "Show min/max on x axis", + "showLabels": "Show labels", + "labelsPosition": "Labels position", + "rounding": "Round Corners", + "sortXAxisBy": "Sort X axis by", + "sortYAxisBy": "Sort Y axis by", + "showGrid": "Show grid", + "orientation": "Orientation", + "orientationOptions": { + "vertical": "Vertical", + "horizontal": "Horizontal" + }, + "strokeWidth": "Stroke width", + "strokeOpacity": "Lines opacity (0-1)", + "drawDonut": "Draw as donuts", + "arcTichkness": "Donut thickness", + "sortArcsBy": "Sort arcs by", + "sortArcsByOptions": { + "totalDescending": "Size (descending)", + "totalAscending": "Size (ascending)", + "name": "Name", + "original": "Original" + }, + "showPiesTitles": "Show pies titles", + "showArcValues": "Show values on arcs", + "sortPiesBy": "Sort pies by", + "sortPiesByOptions": { + "totalDescending": "Size (descending)", + "totalAscending": "Size (ascending)", + "name": "Name", + "original": "Original" + }, + "gridColumns": "Grid columns", + "innerDiameter": "Inner diameter", + "fillOpacity": "Fill opacity", + "labelsPadding": "Axis labels padding", + "alignment": "Nodes alignment", + "iterations": "Iterations (attempts to solve overlaps)", + "nonOverlap": "Label repelling force", + "showDots": "Show dots", + "streamsOrder": "Sort streams by", + "streamsOrderOptions": { + "stackOrderAppearance": "Earliest", + "stackOrderAscending": "Ascending", + "stackOrderDescending": "Descending", + "stackOrderInsideOut": "Inside out", + "stackOrderNone": "None", + "stackOrderReverse": "Reverse" + }, + "labelHierarchyStyle": "Hierarchy labels", + "labelHierarchyStyleOptions": { + "labelPrimary": "Primary", + "labelSecondary": "Secondary", + "labelItalic": "Italic" + }, + "tiling": "Tiling method", + "tilingOptions": { + "treemapBinary": "Binary", + "treemapDice": "Dice", + "treemapSlice": "Slice", + "treemapSliceDice": "Slice and dice", + "treemapSquarify": "Squarify" + }, + "binsNumber": "Number of bins", + "sortViolinsBy": "Sort violins by" + }, + "dimensions": { + "steps": "Steps", + "size": "Size", + "sourceNode": "Source node", + "targetNode": "Target node", + "bars": "Bars", + "color": "Color", + "series": "Series", + "sets": "Sets", + "stacks": "x axis", + "xValue": "x axis", + "label": "Label", + "group": "Groups", + "value": "y axis", + "x": "x axis", + "y": "y axis", + "connectedBy": "Connection by", + "rank": "Ranking", + "streams": "Streams", + "hierarchy": "Hierarchy", + "startDate": "Start date", + "endDate": "End Date", + "lines": "Lines", + "dimensions": "Dimensions", + "arcs": "Arcs", + "axes": "Spokes", + "source": "Source", + "target": "Target", + "name": "Label", + "leafLabel": "Leaf label" + }, + "categories": { + "correlations": "correlations", + "proportions": "proportions", + "networks": "networks", + "distributions": "distributions", + "time series": "time series", + "hierarchies": "hierarchies" + }, + "charts": { + "alluvialdiagram": { + "description": "It shows correlations between categorical dimensions representing them as flows, visually linking categories with shared items. Each rectangle represents a unique value in the selected dimension, its height is proportional to its value. Correlations are represented with curved lines whose width is proportional to their value." + }, + "arcdiagram": { + "description": "A particular kind of network graph, allows seeing relationships among nodes. Nodes are displayed on the horizontal axis, and links as clockwise arcs. An arc above the nodes means a connection from the left to the right, while below means a connection from the right node to the left one." + }, + "barchart": { + "description": "It displays a categorical dimension and related amounts. Each bar represents a category, width is proportional to the quantitative dimension." + }, + "barchartmultiset": { + "description": "It displays multiple quantitative dimensions related to categories. bars are visually grouped in sets according to the categorical dimension, each bar represents a quantitative dimension, mapped on its height." + }, + "barchartstacked": { + "description": "It displays multiple quantitative dimensions related to categories. bars are visually stacked according to the categorical dimension, each bar represents a quantitative dimension, mapped on its height." + }, + "beeswarm": { + "description": "It displays the distribution of items over a continuous dimensions. Each (line) is represented with a dot placed on the horizontal axis. The vertical dimension is used to avoid overlaps among circles, showing their distribution. The area of dots can be used to encode a further quantitative dimension and a quantitative or categorical dimension with color." + }, + "boxplot": { + "description": "It summarize a quantitative distribution with five standard statistics: the smallest value, lower quartile, median, upper quartile, and largest value." + }, + "bubblechart": { + "description": "The basic layout is a scatter plot, which allows to see correlations among two continuous dimensions. A further quantitative dimension with size and a quantitative or categorical dimension with color." + }, + "bumpchart": { + "description": "It allows the comparison of multiple categories over a continuous dimension and the evolution of its sorting. By default, sorting is based on the stream size." + }, + "circlepacking": { + "description": "It displays values of leaf nodes of a hierarchical structure by using circles areas. The hierarchical structure is depicted using nested circles. A further quantitative dimension with size and a quantitative or categorical dimension with color." + }, + "circularDendrogram": { + "description": "It displays hierarchically structured data with a radial tree structure, where the root node is in the center with the hierarchies moving outward. The area of nodes can be used to encode a further quantitative dimension and a quantitative or categorical dimension with color." + }, + "contourPlot": { + "description": "It shows the estimated density of point clouds, which is especially useful to avoid overplotting in large datasets." + }, + "convexHull": { + "description": "In mathematics, the convex hull is the smallest convex shape containing a set of points. Applied to a scatterplot, it is useful to identify points belonging to the same category." + }, + "dendrogram": { + "description": "It displays hierarchically structured data with a tree structure, where the root node is on the left and leaves are on the right. The size of nodes can be used to encode a further quantitative dimension with size and a quantitative or categorical dimension with color." + }, + "ganttChart": { + "description": "A Gantt chart is a type of bar chart, developed by Henry Gantt in the 1910s, that illustrates a project schedule. Gantt charts illustrate the start and finish dates of the terminal elements and summary elements of a project." + }, + "hexagonalBinning": { + "description": "Hexagonal Binning is a way to manage the problem of having too many points that start to overlap. Hexagonal binning plots density, rather than points. Points are binned into gridded hexagons and distribution (the number of points per hexagon) is displayed using either the color or the area of the hexagons." + }, + "horizongraph": { + "description": "It displays a quantitative dimension over a continuous interval or time period. Horizon graphs combine position and color to reduce vertical space." + }, + "linechart": { + "description": "It displays a quantitative dimension over a continuous interval or time period. Colour can be optionally used to encode an additional quantitative or categorical dimension." + }, + "matrixplot": { + "description": "It allows comparison of two categorical dimensions, disposing them on the horizontal and vertical axes. Each glyph (square or circle) represents a possible correlation among the two dimensions. Associated quantitative variables can be represented with size and/or color." + }, + "parallelcoordinates": { + "description": "It displays multiple continuous dimensions as axes, and each row in the dataset produces a line connecting its values across the axes." + }, + "piechart": { + "description": "It allows you to see the proportions between values that make up a whole, by using arcs composing a circle." + }, + "radarchart": { + "description": "It displays multiple continuous dimensions as axes starting from the same point and by disposing them radially. Each dimension is represented as an axis starting from the center of the cart. The same scale is applied to all the axes." + }, + "sankeydiagram": { + "description": "It represents flows among nodes of a network. Nodes are represented as rectangles, the height represents their value. Flows are represented with curved lines whose width is proportional to their value." + }, + "slopechart": { + "description": "It allows the comparison of two continuous dimensions showing them as axes, and using a line to show the relationship." + }, + "streamgraph": { + "description": "It allows the comparison of multiple categories over a continuous dimension." + }, + "sunburst": { + "description": "It displays hierarchically structured data and a related quantitative dimension using concentric circles. The circle in the center represents the root node, with the hierarchies moving outward from the center. The angle of each arc corresponds to the qualitative dimension." + }, + "treemap": { + "description": "It displays hierarchically structured data and a related quantitative dimension. It is composed of an area divided into small rectangles, representing the last level of the tree structure. The rectangles’ size depends on the quantitative dimension." + }, + "violinplot": { + "description": "It is useful to show the distribution of a numeric dimension. The shape width represents the amount of items with the same value in the dataset." + }, + "voronoidiagram": { + "description": "It creates the minimum area around each point defined by two variables. When applied to a scatterplot, it is useful to show the distance between points." + } + } +} \ No newline at end of file diff --git a/locales/fr.json b/locales/fr.json new file mode 100644 index 00000000..6ca80e0f --- /dev/null +++ b/locales/fr.json @@ -0,0 +1,364 @@ +{ + "visualOptions": { + "marginTop": "Marge (haut)", + "marginRight": "marge (à droite)", + "marginBottom": "marge (en bas)", + "marginLeft": "marge (à gauche)", + "nodesWidth": "largeur des nœuds", + "nodesPadding": "Rembourrage", + "linksOpacity": "liens opacité (0-1)", + "linksBlendMode": "mode de mélange de liens", + "sortNodesBy": "Trier les nœuds par", + "sortNodesByOptions": { + "sizeDescending": "taille (descendante)", + "sizeAscending": "taille (ascendante)", + "name": "Nom", + "auto": "minimise les chevauchements" + }, + "verticalAlignment": "flux alignement", + "colorScale": "échelle de couleur", + "showValues": "Afficher les valeurs des nœuds", + "minDiameter": "diamètre min", + "maxDiameter": "diamètre max", + "linkOpacity": "liens opacité (0-1)", + "sameSide": "arcs seulement sur le dessus", + "nodeSize": "diamètre des nœuds", + "nodeSizeOptions": { + "default": "Même taille", + "totalValue": "degré pondéré", + "inValue": "Degre pondéré", + "outValue": "Poids pondéré", + "degree": "liens comptent", + "outDegree": "NOTEGREE", + "inDegree": "Degree" + }, + "orderNodesBy": "Trier les nœuds par", + "showLegend": "montre légende", + "legendWidth": "largeur de légende", + "padding": "Rembourrage", + "barsOrientation": "orientation des barres", + "barsOrientationOptions": { + "vertical": "Verticalement", + "horizontal": "horizontalement" + }, + "sortBarsBy": "de tri des barres par", + "sortBarsByOptions": { + "totalDescending": "taille (descendante)", + "totalAscending": "taille (ascendante)", + "name": "Nom", + "original": "Original" + }, + "useSameScale": "utiliser la même échelle", + "columnsNumber": "Le nombre de colonnes", + "sortSeriesBy": "Série de tri par", + "showSeriesLabels": "titres de la série Afficher", + "repeatAxesLabels": "Répéter les étiquettes d'axe pour chaque série", + "showSeriesGrid": "montre la grille de la série", + "setsPadding": "rembourrage entre les ensembles", + "barsPadding": "rembourrage entre les barres", + "SortXAxisBy": "trier x axe par", + "sortSeriesByOptions": { + "valueDescending": "valeur totale (descendante)", + "valueAscending": "valeur totale (ascendante)", + "name": "Nom", + "none": "Original", + "nameAscending": "Nom" + }, + "stacksPadding": "Rembourrage", + "stacksOrder": "Trier les piles par", + "nodePadding": "Rembourrage", + "sortGroupsBy": "Trier les groupes par", + "labelStyles": "Étiqueter", + "labelStylesOptions": { + "labelPrimary": "Primaire", + "labelSecondary": "Secondaire", + "labelItalic": "Italique" + }, + "showLabelsOutline": "spectacle contour", + "autoHideLabels": "Masquer automatiquement les étiquettes", + "barsWidth": "largeur de barres", + "iqrMultiplier": "multiplicateur de plage interquartile", + "dotsDiameter": "diamètre des points", + "yOrigin": "SET Y Origine à 0", + "showBoxPlots": "Afficher les valeurs BOXPOT", + "xOrigin": "Set X Origine à 0", + "showStroke": "montre un coup", + "showDotsOnData": "Afficher les points sur les valeurs de données", + "interpolation": "type de courbes", + "interpolationOptions": { + "curveBasis": "Base", + "curveCardinal": "Cardinal", + "curveCatmullRom": "catmull-rom", + "curveLinear": "Linéaire", + "curveMonotoneX": "monotone x", + "curveNatural": "Naturel", + "curveStep": "Étape", + "curveStepAfter": "étape après", + "curveStepBefore": "étape avant", + "Basis": "Base", + "Bundle": "Empaqueter", + "Cardinal": "Cardinal", + "CatmullRom": "catmull-rom", + "Linear": "Linéaire", + "MonotoneX": "monotone x", + "Natural": "Naturel", + "Step": "Étape", + "StepAfter": "étape après", + "StepBefore": "étape avant" + }, + "streamsOffset": "flux alignement vertical", + "streamsOffsetOptions": { + "stackOffsetExpand": "Développer", + "stackOffsetSilhouette": "Silhouette", + "stackOffsetNone": "Rien", + "stackOffsetWiggle": "Remuer" + }, + "streamsPadding": "Rembourrage", + "showYAxis": "montre Y axe", + "showStreams": "Afficher les étiquettes de flux", + "labelsType": "position d'étiquettes", + "sortCirclesBy": "Trier les cercles par", + "sortCirclesByOptions": { + "descending": "taille (descendante)", + "ascending": "taille (ascendante)", + "original": "Original" + }, + "showHierarchyLabels": "montre les étiquettes de hiérarchie", + "hierarchyLabelsStyle": "Etiquettes de hiérarchie Position", + "hierarchyLabelsStyleOptions": { + "onPath": "sur le chemin", + "onPoint": "Sur le point" + }, + "layout": "algorythm de la mise en page", + "sortBy": "Trier les nœuds par", + "sizeOnlyLeaves": "Nœuds de feuilles de taille seulement", + "hierarchyStyle": "étiquettes de hiérarchie", + "hierarchyStyleOptions": { + "labelPrimary": "Primaire", + "labelSecondary": "Secondaire", + "labelItalic": "Italique" + }, + "bandwidth": "bande passante", + "showBandLabels": "show band labels", + "labelThresholds": "étapes seuils d'étiquettes", + "groupStrokeWidth": "largeur de course de groupes", + "groupOpacity": "Remplir l'opacité", + "sortGroupsByOptions": { + "": "Original", + "ascending": "Date de début (ascendante)", + "descending": "Date de début (décroissant)", + "group": "Nom", + "valueDescending": "valeur totale (descendante)", + "valueAscending": "valeur totale (ascendante)", + "name": "Nom", + "none": "Original" + }, + "barPadding": "rembourrage (%)", + "alignLabels": "position d'étiquettes", + "diameter": "diamètre bin", + "weightSize": "Scale Hexagons Zone", + "showCountLabels": "Afficher les étiquettes de comptage", + "bands": "Nombre de bandes", + "curveType": "type de courbe", + "negativeStyle": "montre des valeurs négatives comme", + "negativeStyleOptions": { + "mirrored": "miroir", + "top": "Décalage" + }, + "xTicksAuto": "ticks à la place automatique sur l'axe x", + "xTicksAmount": "max. Ticks sur x axe", + "xTicksOuter": "montre min / max sur x axe", + "showLabels": "Afficher les étiquettes", + "labelsPosition": "position d'étiquettes", + "rounding": "coins ronds", + "sortXAxisBy": "trier x axe par", + "sortYAxisBy": "Trier Y Axe par", + "showGrid": "montre la grille", + "orientation": "Orientation", + "orientationOptions": { + "vertical": "Verticale", + "horizontal": "Horizontal" + }, + "strokeWidth": "Largeur du trait", + "strokeOpacity": "opacité de lignes (0-1)", + "drawDonut": "dessine comme beignets", + "arcTichkness": "épaisseur de beignet", + "sortArcsBy": "Trier les arcs par", + "sortArcsByOptions": { + "totalDescending": "taille (descendante)", + "totalAscending": "taille (ascendante)", + "name": "Nom", + "original": "Original" + }, + "showPiesTitles": "Afficher les titres de tartes", + "showArcValues": "montre les valeurs sur arcs", + "sortPiesBy": "Trier les tartes par", + "sortPiesByOptions": { + "totalDescending": "taille (descendante)", + "totalAscending": "taille (ascendante)", + "name": "Nom", + "original": "Original" + }, + "gridColumns": "colonnes de grille", + "innerDiameter": "Diamètre intérieur", + "fillOpacity": "Remplir l'opacité", + "labelsPadding": "Etiquettes d'axe Rembourrage", + "alignment": "alignement des nœuds", + "iterations": "itérations (tente de résoudre les chevauchements)", + "nonOverlap": "Labraque d'étiquette", + "showDots": "montre des points", + "streamsOrder": "Trier les flux par", + "streamsOrderOptions": { + "stackOrderAppearance": "le plus tôt", + "stackOrderAscending": "Ascendant", + "stackOrderDescending": "Descendant", + "stackOrderInsideOut": "À l'envers", + "stackOrderNone": "Rien", + "stackOrderReverse": "Inverser" + }, + "labelHierarchyStyle": "étiquettes de hiérarchie", + "labelHierarchyStyleOptions": { + "labelPrimary": "Primaire", + "labelSecondary": "Secondaire", + "labelItalic": "Italique" + }, + "tiling": "méthode de carrelage", + "tilingOptions": { + "treemapBinary": "Binaire", + "treemapDice": "Dé", + "treemapSlice": "Tranche", + "treemapSliceDice": "Émincer", + "treemapSquarify": "Quarifie" + }, + "binsNumber": "Nombre de bacs", + "sortViolinsBy": "trier les violons par" + }, + "dimensions": { + "steps": "Pas", + "size": "Taille", + "sourceNode": "noeud source", + "targetNode": "nœud cible", + "bars": "bars", + "color": "Couleur", + "series": "Séries", + "sets": "sets", + "stacks": "x axe", + "xValue": "x axe", + "label": "Étiqueter", + "group": "Groupes", + "value": "axe y", + "x": "x axe", + "y": "axe y", + "connectedBy": "connexion par", + "rank": "Classement", + "streams": "Ruisseaux", + "hierarchy": "Hiérarchie", + "startDate": "Date de début", + "endDate": "Date de fin", + "lines": "Lignes", + "dimensions": "Dimensions", + "arcs": "arcs", + "axes": "rayons", + "source": "La source", + "target": "Cible", + "name": "Étiqueter", + "leafLabel": "label feuille" + }, + "categories": { + "correlations": "corrélations", + "proportions": "proportions", + "networks": "réseaux", + "distributions": "distributions", + "time series": "des séries chronologiques", + "hierarchies": "hiérarchies" + }, + "charts": { + "alluvialdiagram": { + "description": "Il affiche des corrélations entre les dimensions catégoriques les représentant en tant que flux, reliant visuellement les catégories avec des éléments partagés. Chaque rectangle représente une valeur unique dans la dimension sélectionnée, sa hauteur est proportionnelle à sa valeur. Les corrélations sont représentées avec des lignes courbes dont la largeur est proportionnelle à leur valeur." + }, + "arcdiagram": { + "description": "Un type particulier de graphique de réseau permet de voir des relations entre les nœuds. Les nœuds sont affichés sur l'axe horizontal et des liens comme des arcs dans le sens des aiguilles d'une montre. Un arc au-dessus des nœuds signifie une connexion de gauche à droite, tandis que ci-dessous signifie une connexion du nœud droit à la gauche." + }, + "barchart": { + "description": "Il affiche une dimension catégorique et des quantités connexes. Chaque barre représente une catégorie, la largeur est proportionnelle à la dimension quantitative." + }, + "barchartmultiset": { + "description": "Il affiche plusieurs dimensions quantitatives liées aux catégories. Les barres sont regroupées visuellement dans des ensembles selon la dimension catégorique, chaque barre représente une dimension quantitative, mappée sur sa hauteur." + }, + "barchartstacked": { + "description": "Il affiche plusieurs dimensions quantitatives liées aux catégories. Les barres sont visuellement empilées selon la dimension catégorique, chaque barre représente une dimension quantitative, mappée sur sa hauteur." + }, + "beeswarm": { + "description": "Il affiche la distribution d'éléments sur une dimension continue. Chaque (ligne) est représentée avec un point placé sur l'axe horizontal. La dimension verticale est utilisée pour éviter les chevauchements entre les cercles, montrant leur distribution. La zone de points peut être utilisée pour coder une autre dimension quantitative et une dimension quantitative ou catégorique avec la couleur." + }, + "boxplot": { + "description": "Il résume une distribution quantitative avec cinq statistiques standard: la plus petite valeur, le quartile inférieur, la médiane, le quartile supérieur et la plus grande valeur." + }, + "bubblechart": { + "description": "La disposition de base est une parcelle de dispersion, ce qui permet de voir des corrélations entre deux dimensions continues. Une autre dimension quantitative avec une taille et une dimension quantitative ou catégorique avec la couleur." + }, + "bumpchart": { + "description": "Il permet la comparaison de plusieurs catégories sur une dimension continue et l'évolution de son tri. Par défaut, le tri est basé sur la taille du flux." + }, + "circlepacking": { + "description": "Il affiche des valeurs des nœuds de feuilles d'une structure hiérarchique en utilisant des zones de cercles. La structure hiérarchique est décrite avec des cercles imbriqués. Une autre dimension quantitative avec une taille et une dimension quantitative ou catégorique avec la couleur." + }, + "circularDendrogram": { + "description": "Il affiche des données structurées hiérarchiquement avec une structure arborescente radiale, où le nœud racine est au centre avec les hiérarchies se déplaçant vers l'extérieur. La zone de nœuds peut être utilisée pour coder une autre dimension quantitative et une dimension quantitative ou catégorique avec la couleur." + }, + "contourPlot": { + "description": "Il montre la densité estimée des nuages ​​de points, qui est particulièrement utile pour éviter de surcharger dans de grands ensembles de données." + }, + "convexHull": { + "description": "en mathématiques, la coque convexe est la plus petite forme convexe contenant un ensemble de points. Appliqué à une diffamationPLOT, il est utile d'identifier des points appartenant à la même catégorie." + }, + "dendrogram": { + "description": "Il affiche des données structurées hiérarchiquement avec une structure d'arborescence, où le nœud racine est à gauche et les feuilles sont à droite. La taille des nœuds peut être utilisée pour coder une autre dimension quantitative avec une taille et une dimension quantitative ou catégorique avec la couleur." + }, + "ganttChart": { + "description": "Un diagramme de Gantt est un type de graphique à barres, développé par Henry Gantt dans les années 1910, qui illustre un programme de projet. Les diagrammes de Gantt illustrent les dates de début et de fin des éléments de terminal et des éléments de résumé d'un projet." + }, + "hexagonalBinning": { + "description": "Binning hexagonal est un moyen de gérer le problème d'avoir trop de points qui commencent à se chevaucher. Densité des parcelles de binning hexagonales, plutôt que des points. Les points sont enfreignés dans des hexagones et une distribution dilapées (le nombre de points par hexagone) s'affiche à l'aide de la couleur ou de la zone des hexagones." + }, + "horizongraph": { + "description": "affiche une dimension quantitative sur un intervalle ou une période continue. Horizon Graphiques Combinez la position et la couleur pour réduire l'espace vertical." + }, + "linechart": { + "description": "affiche une dimension quantitative sur un intervalle ou une période continue. La couleur peut être éventuellement utilisée pour coder une dimension quantitative ou catégorique supplémentaire." + }, + "matrixplot": { + "description": "Il permet de comparer deux dimensions catégoriques, les disposant sur les axes horizontaux et verticaux. Chaque glyphe (carré ou cercle) représente une éventuelle corrélation entre les deux dimensions. Les variables quantitatives associées peuvent être représentées avec la taille et / ou la couleur." + }, + "parallelcoordinates": { + "description": "Il affiche plusieurs dimensions continues sous forme d'axes et chaque ligne de l'ensemble de données produit une ligne connectant ses valeurs sur les axes." + }, + "piechart": { + "description": "Il vous permet de voir les proportions entre les valeurs qui composent un ensemble, en utilisant des arcs composant un cercle." + }, + "radarchart": { + "description": "Il affiche plusieurs dimensions continues sous forme d'axes à partir du même point et en les disposant radialement. Chaque dimension est représentée comme un axe à partir du centre du chariot. La même échelle est appliquée à tous les axes." + }, + "sankeydiagram": { + "description": "Il représente les flux entre les nœuds d'un réseau. Les nœuds sont représentés sous forme de rectangles, la hauteur représente leur valeur. Les flux sont représentés avec des lignes courbes dont la largeur est proportionnelle à leur valeur." + }, + "slopechart": { + "description": "Il permet la comparaison de deux dimensions continues montrant comme des axes et en utilisant une ligne pour afficher la relation." + }, + "streamgraph": { + "description": "Il permet la comparaison de plusieurs catégories sur une dimension continue." + }, + "sunburst": { + "description": "Il affiche des données structurées hiérarchiquement et une dimension quantitative liée à l'aide de cercles concentriques. Le cercle au centre représente le nœud racine, les hiérarchies se déplaçant vers l'extérieur du centre. L'angle de chaque ARC correspond à la dimension qualitative." + }, + "treemap": { + "description": "Il affiche des données structurées hiérarchiquement et une dimension quantitative liée. Il est composé d'une zone divisée en petits rectangles, représentant le dernier niveau de la structure des arbres. La taille des rectangles dépend de la dimension quantitative." + }, + "violinplot": { + "description": "Il est utile de montrer la distribution d'une dimension numérique. La largeur de forme représente la quantité d'éléments de la même valeur dans l'ensemble de données." + }, + "voronoidiagram": { + "description": "Il crée la zone minimale autour de chaque point défini par deux variables. Lorsqu'il est appliqué sur une plante de dispersion, il est utile de montrer la distance entre les points." + } + } +} \ No newline at end of file diff --git a/locales/it.json b/locales/it.json new file mode 100644 index 00000000..11aa35ee --- /dev/null +++ b/locales/it.json @@ -0,0 +1,364 @@ +{ + "visualOptions": { + "marginTop": "Margine (in alto)", + "marginRight": "margine (a destra)", + "marginBottom": "margine (in basso)", + "marginLeft": "Margine (a sinistra)", + "nodesWidth": "nodi larghezza", + "nodesPadding": "Imbottitura", + "linksOpacity": "collega l'opacità (0-1)", + "linksBlendMode": "collegamenti in modalità fusione", + "sortNodesBy": "ordinamento nodi di", + "sortNodesByOptions": { + "sizeDescending": "dimensione (discendente)", + "sizeAscending": "dimensione (ascendente)", + "name": "Nome", + "auto": "minimizzare le sovrapposizioni" + }, + "verticalAlignment": "fluisce allineamento", + "colorScale": "scala di colore", + "showValues": "Visualizza i valori dei nodi", + "minDiameter": "Min Diametro.", + "maxDiameter": "diametro massimo", + "linkOpacity": "collega l'opacità (0-1)", + "sameSide": "ARC solo in alto", + "nodeSize": "Diametro nodi", + "nodeSizeOptions": { + "default": "Stessa misura", + "totalValue": "grado ponderato.", + "inValue": "indegresco ponderato", + "outValue": "Outdoregree ponderato", + "degree": "conta dei link", + "outDegree": "outdoregree.", + "inDegree": "Indegree." + }, + "orderNodesBy": "ordinamento nodi di", + "showLegend": "mostra leggenda", + "legendWidth": "leggenda larghezza", + "padding": "Imbottitura", + "barsOrientation": "barre orientamento", + "barsOrientationOptions": { + "vertical": "Verticalmente", + "horizontal": "Orizzontalmente" + }, + "sortBarsBy": "Ordina barre di", + "sortBarsByOptions": { + "totalDescending": "dimensione (discendente)", + "totalAscending": "dimensione (ascendente)", + "name": "Nome", + "original": "Originale" + }, + "useSameScale": "usa la stessa scala", + "columnsNumber": "Numero di colonne", + "sortSeriesBy": "serie di ordinamenti di", + "showSeriesLabels": "Mostra i titoli della serie", + "repeatAxesLabels": "ripeti le etichette degli assi per ogni serie", + "showSeriesGrid": "Mostra griglia della serie", + "setsPadding": "imbottitura tra set", + "barsPadding": "imbottitura tra le barre", + "SortXAxisBy": "ordina asse x di", + "sortSeriesByOptions": { + "valueDescending": "valore totale (discendente)", + "valueAscending": "valore totale (ascendente)", + "name": "Nome", + "none": "Originale", + "nameAscending": "Nome" + }, + "stacksPadding": "Imbottitura", + "stacksOrder": "ordina pile di", + "nodePadding": "Imbottitura", + "sortGroupsBy": "Gruppi di ordinamento di", + "labelStyles": "Etichetta", + "labelStylesOptions": { + "labelPrimary": "Primario", + "labelSecondary": "Secondario", + "labelItalic": "Corsivo" + }, + "showLabelsOutline": "Mostra schema", + "autoHideLabels": "Nascondi etichette", + "barsWidth": "barre larghe", + "iqrMultiplier": "moltiplicatore intervallo interquatile", + "dotsDiameter": "DOWT Diametro.", + "yOrigin": "imposta l'origine y a 0", + "showBoxPlots": "Mostra valori boxpot", + "xOrigin": "imposta x origine a 0", + "showStroke": "Mostra ictus.", + "showDotsOnData": "Mostra punti sui valori dei dati", + "interpolation": "Tipo di curve", + "interpolationOptions": { + "curveBasis": "Base", + "curveCardinal": "Cardinale", + "curveCatmullRom": "catmull-rom", + "curveLinear": "Lineare", + "curveMonotoneX": "monotone x.", + "curveNatural": "Naturale", + "curveStep": "Fare un passo", + "curveStepAfter": "passo dopo", + "curveStepBefore": "passo prima", + "Basis": "Base", + "Bundle": "Fascio", + "Cardinal": "Cardinale", + "CatmullRom": "catmull-rom", + "Linear": "Lineare", + "MonotoneX": "monotone x.", + "Natural": "Naturale", + "Step": "Fare un passo", + "StepAfter": "passo dopo", + "StepBefore": "passo prima" + }, + "streamsOffset": "Streams Allineamento verticale", + "streamsOffsetOptions": { + "stackOffsetExpand": "Espandere", + "stackOffsetSilhouette": "Silhouette", + "stackOffsetNone": "Nessuno", + "stackOffsetWiggle": "wiggle." + }, + "streamsPadding": "Imbottitura", + "showYAxis": "mostra l'asse y", + "showStreams": "mostra le etichette di flussi", + "labelsType": "posizione etichette", + "sortCirclesBy": "Ordina i cerchi di", + "sortCirclesByOptions": { + "descending": "dimensione (discendente)", + "ascending": "dimensione (ascendente)", + "original": "Originale" + }, + "showHierarchyLabels": "mostra etichette gerarchia", + "hierarchyLabelsStyle": "posizione di etichette gerarchia", + "hierarchyLabelsStyleOptions": { + "onPath": "sul percorso.", + "onPoint": "Sul punto" + }, + "layout": "Layout Algorythm.", + "sortBy": "ordinamento nodi di", + "sizeOnlyLeaves": "dimensione solo nodi foglia", + "hierarchyStyle": "Etichette gerarchia", + "hierarchyStyleOptions": { + "labelPrimary": "Primario", + "labelSecondary": "Secondario", + "labelItalic": "Corsivo" + }, + "bandwidth": "larghezza di banda", + "showBandLabels": "Mostra etichette della banda", + "labelThresholds": "Passi di soglia di etichette", + "groupStrokeWidth": "Gruppi Larghezza della corsa", + "groupOpacity": "riempire opacità", + "sortGroupsByOptions": { + "": "Originale", + "ascending": "Data di inizio (ascendente)", + "descending": "data di inizio (discendente)", + "group": "Nome", + "valueDescending": "valore totale (discendente)", + "valueAscending": "valore totale (ascendente)", + "name": "Nome", + "none": "Originale" + }, + "barPadding": "imbottitura (%)", + "alignLabels": "posizione etichette", + "diameter": "diametro del bin.", + "weightSize": "scala Esagons Area", + "showCountLabels": "Mostra etichette di conteggio", + "bands": "Numero di bande", + "curveType": "tipo curva", + "negativeStyle": "Mostra valori negativi come", + "negativeStyleOptions": { + "mirrored": "Rispecchiato", + "top": "Compensare" + }, + "xTicksAuto": "zecche automatiche su asse x", + "xTicksAmount": "max. zecche sull'asse x", + "xTicksOuter": "Mostra min / max sull'asse x", + "showLabels": "Mostra etichette", + "labelsPosition": "posizione etichette", + "rounding": "angoli rotondi", + "sortXAxisBy": "ordina asse x di", + "sortYAxisBy": "ordina asse y da", + "showGrid": "mostra grid.", + "orientation": "Orientamento", + "orientationOptions": { + "vertical": "Verticale", + "horizontal": "Orizzontale" + }, + "strokeWidth": "larghezza del colpo", + "strokeOpacity": "linee opacità (0-1)", + "drawDonut": "disegna come ciambelle", + "arcTichkness": "spessore della ciambella", + "sortArcsBy": "Ordina ARCS di", + "sortArcsByOptions": { + "totalDescending": "dimensione (discendente)", + "totalAscending": "dimensione (ascendente)", + "name": "Nome", + "original": "Originale" + }, + "showPiesTitles": "Mostra i titoli delle torte", + "showArcValues": "Mostra valori su archi", + "sortPiesBy": "Ordina torte da", + "sortPiesByOptions": { + "totalDescending": "dimensione (discendente)", + "totalAscending": "dimensione (ascendente)", + "name": "Nome", + "original": "Originale" + }, + "gridColumns": "colonne grid.", + "innerDiameter": "Diametro interno", + "fillOpacity": "riempire opacità", + "labelsPadding": "imbottitura di etichette Axis", + "alignment": "allineamento nodi", + "iterations": "iterazioni (tentativi di risolvere sovrapposizioni)", + "nonOverlap": "Etichetta che respinge forza", + "showDots": "Show Dots.", + "streamsOrder": "ordinamento dei flussi di", + "streamsOrderOptions": { + "stackOrderAppearance": "Più presto", + "stackOrderAscending": "Ascendente", + "stackOrderDescending": "Discendente", + "stackOrderInsideOut": "Alla rovescia", + "stackOrderNone": "Nessuno", + "stackOrderReverse": "Inversione" + }, + "labelHierarchyStyle": "Etichette gerarchia", + "labelHierarchyStyleOptions": { + "labelPrimary": "Primario", + "labelSecondary": "Secondario", + "labelItalic": "Corsivo" + }, + "tiling": "Metodo di piastrellatura", + "tilingOptions": { + "treemapBinary": "Binario", + "treemapDice": "Dado", + "treemapSlice": "Fetta", + "treemapSliceDice": "Fare a pezzi", + "treemapSquarify": "Squariby." + }, + "binsNumber": "Numero di bidoni", + "sortViolinsBy": "ordina violini di" + }, + "dimensions": { + "steps": "passi", + "size": "Taglia", + "sourceNode": "nodo sorgente", + "targetNode": "Nodo di destinazione", + "bars": "Barre", + "color": "Colore", + "series": "Serie", + "sets": "Imposta", + "stacks": "asse x", + "xValue": "asse x", + "label": "Etichetta", + "group": "gruppi", + "value": "asse y", + "x": "asse x", + "y": "asse y", + "connectedBy": "Connessione entro", + "rank": "Classifica", + "streams": "Flussi", + "hierarchy": "Gerarchia", + "startDate": "Data d'inizio", + "endDate": "Data di fine", + "lines": "Linee", + "dimensions": "Dimensioni", + "arcs": "Arcs.", + "axes": "raggi", + "source": "Fonte", + "target": "Obbiettivo", + "name": "Etichetta", + "leafLabel": "Etichetta fogliare" + }, + "categories": { + "correlations": "correlazioni", + "proportions": "proporzioni", + "networks": "reti.", + "distributions": "distribuzioni", + "time series": "serie temporale", + "hierarchies": "Gerarchie" + }, + "charts": { + "alluvialdiagram": { + "description": "Mostra correlazioni tra le dimensioni categoriali che li rappresentano come flussi, collegando visivamente categorie con articoli condivisi. Ogni rettangolo rappresenta un valore unico nella dimensione selezionata, la sua altezza è proporzionale al suo valore. Le correlazioni sono rappresentate con linee curve la cui larghezza è proporzionale al loro valore." + }, + "arcdiagram": { + "description": "Un particolare tipo di grafico di rete, consente di vedere relazioni tra i nodi. I nodi vengono visualizzati sull'asse orizzontale e collega gli archi in senso orario. Un arco sopra i nodi indica una connessione da sinistra a destra, mentre sotto indica una connessione dal nodo giusto a sinistra." + }, + "barchart": { + "description": "Visualizza una dimensione categoriale e importi correlati. Ogni barra rappresenta una categoria, la larghezza è proporzionale alla dimensione quantitativa." + }, + "barchartmultiset": { + "description": "visualizza più dimensioni quantitative relative alle categorie. Le barre vengono raggruppate visivamente in serie in base alla dimensione categorica, ogni barra rappresenta una dimensione quantitativa, mappata sulla sua altezza." + }, + "barchartstacked": { + "description": "visualizza più dimensioni quantitative relative alle categorie. Le barre vengono visivamente impilate in base alla dimensione categoriale, ogni barra rappresenta una dimensione quantitativa, mappata sulla sua altezza." + }, + "beeswarm": { + "description": "Visualizza la distribuzione di elementi su una dimensione continua. Ogni (linea) è rappresentato con un punto posizionato sull'asse orizzontale. La dimensione verticale viene utilizzata per evitare sovrapposizioni tra i cerchi, mostrando la loro distribuzione. L'area dei punti può essere utilizzata per codificare un'ulteriore dimensione quantitativa e una dimensione quantitativa o categorica con il colore." + }, + "boxplot": { + "description": "Riassumi una distribuzione quantitativa con cinque statistiche standard: il valore più piccolo, il quartile inferiore, la mediana, il quartile superiore e il valore più grande." + }, + "bubblechart": { + "description": "Il layout di base è un grafico a dispersione, che consente di vedere correlazioni tra due dimensioni continue. Un'ulteriore dimensione quantitativa con dimensioni e una dimensione quantitativa o categorica con il colore." + }, + "bumpchart": { + "description": "consente il confronto di più categorie su una dimensione continua e l'evoluzione del suo ordinamento. Per impostazione predefinita, l'ordinamento si basa sulla dimensione del flusso." + }, + "circlepacking": { + "description": "visualizza i valori dei nodi foglia di una struttura gerarchica utilizzando aree del cerchio. La struttura gerarchica è raffigurata utilizzando cerchi nidificati. Un'ulteriore dimensione quantitativa con dimensioni e una dimensione quantitativa o categorica con il colore." + }, + "circularDendrogram": { + "description": "Visualizza dati strutturati gerarchicamente con una struttura ad albero radiale, in cui il nodo radice è al centro con le gerarchie che si spostano verso l'esterno. L'area dei nodi può essere utilizzata per codificare un'ulteriore dimensione quantitativa e una dimensione quantitativa o categorica con il colore." + }, + "contourPlot": { + "description": "Mostra la densità stimata delle nuvole del punto, che è particolarmente utile per evitare il sovraccarico in set di dati di grandi dimensioni." + }, + "convexHull": { + "description": "In matematica, lo scafo convesso è la più piccola forma convessa contenente un insieme di punti. Applicato a un dispersolo, è utile identificare i punti appartenenti alla stessa categoria." + }, + "dendrogram": { + "description": "Visualizza dati gerarchicamente strutturati con una struttura ad albero, dove il nodo radice è a sinistra ea sinistra a destra. La dimensione dei nodi può essere utilizzata per codificare una ulteriore dimensione quantitativa con dimensioni e una dimensione quantitativa o categorica con il colore." + }, + "ganttChart": { + "description": "Un grafico Gantt è un tipo di grafico a barre, sviluppato da Henry Gantt negli anni '10, che illustra un programma di progetto. I grafici di Gantt illustrano le date di avvio e finitura degli elementi terminali e degli elementi di riepilogo di un progetto." + }, + "hexagonalBinning": { + "description": "Binning esagonale è un modo per gestire il problema di avere troppi punti che iniziano a sovrapporsi. Densità di binning esagonale delle trame, piuttosto che punti. I punti sono bonificati in esagoni e distribuzione griddati (il numero di punti per esagono) viene visualizzato utilizzando il colore o l'area degli esagoni." + }, + "horizongraph": { + "description": "Visualizza una dimensione quantitativa su un intervallo continuo o un periodo di tempo. I grafici dell'orizzonte combinano la posizione e il colore per ridurre lo spazio verticale." + }, + "linechart": { + "description": "Visualizza una dimensione quantitativa su un intervallo continuo o un periodo di tempo. Il colore può essere utilizzato opzionalmente per codificare una dimensione quantitativa o categorica aggiuntiva." + }, + "matrixplot": { + "description": "Permette il confronto di due dimensioni categoriali, smalmandole sugli assi orizzontali e verticali. Ogni glifo (quadrato o cerchio) rappresenta una possibile correlazione tra le due dimensioni. Le variabili quantitative associate possono essere rappresentate con dimensioni e / o colore." + }, + "parallelcoordinates": { + "description": "visualizza più dimensioni continue come assi e ogni riga nel set di dati produce una linea che collega i suoi valori attraverso gli assi." + }, + "piechart": { + "description": "Ti permette di vedere le proporzioni tra i valori che compongono un intero, usando gli archi che compongono un cerchio." + }, + "radarchart": { + "description": "visualizza più dimensioni continue come assi che iniziano dallo stesso punto e la smaltivano radialmente. Ogni dimensione è rappresentata come asse che inizia dal centro del carrello. La stessa scala è applicata a tutti gli assi." + }, + "sankeydiagram": { + "description": "Rappresenta i flussi tra i nodi di una rete. I nodi sono rappresentati come rettangoli, l'altezza rappresenta il loro valore. I flussi sono rappresentati con linee curve la cui larghezza è proporzionale al loro valore." + }, + "slopechart": { + "description": "Consente il confronto di due dimensioni continue che li mostrano come assi e utilizzando una linea per mostrare la relazione." + }, + "streamgraph": { + "description": "Consente il confronto di più categorie su una dimensione continua." + }, + "sunburst": { + "description": "Visualizza dati strutturati gerarchicamente e una dimensione quantitativa correlata utilizzando cerchi concentrici. Il cerchio nel centro rappresenta il nodo radice, con le gerarchie che si spostano verso l'esterno dal centro. L'angolo di ciascun arco corrisponde alla dimensione qualitativa." + }, + "treemap": { + "description": "visualizza dati strutturati gerarchicamente e una dimensione quantitativa correlata. È composto da un'area divisa in piccoli rettangoli, che rappresenta l'ultimo livello della struttura ad albero. La dimensione dei rettangoli dipende dalla dimensione quantitativa." + }, + "violinplot": { + "description": "È utile mostrare la distribuzione di una dimensione numerica. La larghezza della forma rappresenta la quantità di elementi con lo stesso valore nel set di dati." + }, + "voronoidiagram": { + "description": "Crea l'area minima attorno a ciascun punto definito da due variabili. Se applicato a un dispersolo, è utile mostrare la distanza tra i punti." + } + } +} \ No newline at end of file diff --git a/src/alluvialdiagram/dimensions.js b/src/alluvialdiagram/dimensions.js index fbfbf109..d2426a3d 100644 --- a/src/alluvialdiagram/dimensions.js +++ b/src/alluvialdiagram/dimensions.js @@ -1,7 +1,9 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'steps', - name: 'Steps', + name: t('dimensions.steps'), validTypes: ['number', 'date', 'string'], required: true, multiple: true, @@ -9,7 +11,7 @@ export const dimensions = [ }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: false, aggregation: true, diff --git a/src/alluvialdiagram/metadata.js b/src/alluvialdiagram/metadata.js index 8d6aafe2..b6324a49 100644 --- a/src/alluvialdiagram/metadata.js +++ b/src/alluvialdiagram/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './alluvialdiagram.svg' import thumbnail from './alluvialdiagram_thumb.svg' @@ -9,7 +10,6 @@ export const metadata = { code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/alluvialdiagram', tutorial: 'https://rawgraphs.io/learning/how-to-make-an-alluvial-diagram/', - categories: ['correlations', 'proportions'], - description: - 'It shows correlations between categorical dimensions representing them as flows, visually linking categories with shared items. Each rectangle represents a unique value in the selected dimension, its height is proportional to its value. Correlations are represented with curved lines whose width is proportional to their value.', + categories: [t('categories.correlations'), t('categories.proportions')], + description: t('charts.alluvialdiagram.description'), } diff --git a/src/alluvialdiagram/visualOptions.js b/src/alluvialdiagram/visualOptions.js index c0508ecc..ec197d1a 100644 --- a/src/alluvialdiagram/visualOptions.js +++ b/src/alluvialdiagram/visualOptions.js @@ -1,88 +1,92 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 10, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 10, group: 'artboard', }, - nodesWidth: { type: 'number', - label: 'Nodes width', + label: t('visualOptions.nodesWidth'), default: 5, group: 'chart', }, - nodesPadding: { type: 'number', - label: 'Padding', + label: t('visualOptions.nodesPadding'), default: 5, group: 'chart', }, - linksOpacity: { type: 'number', - label: 'Links opacity (0-1)', + label: t('visualOptions.linksOpacity'), default: 1, step: 0.1, min: 0, max: 1, group: 'chart', }, - linksBlendMode: { type: 'text', - label: 'Links blend mode', + label: t('visualOptions.linksBlendMode'), group: 'chart', options: ['normal', 'multiply'], default: 'multiply', }, - sortNodesBy: { type: 'text', - label: 'Sort nodes by', + label: t('visualOptions.sortNodesBy'), group: 'chart', options: [ - { label: 'Size (descending)', value: 'sizeDescending' }, - { label: 'Size (ascending)', value: 'sizeAscending' }, - { label: 'Name', value: 'name' }, - { label: 'Minimize Overlaps', value: 'auto' }, + { + label: t('visualOptions.sortNodesByOptions.sizeDescending'), + value: 'sizeDescending', + }, + { + label: t('visualOptions.sortNodesByOptions.sizeAscending'), + value: 'sizeAscending', + }, + { + label: t('visualOptions.sortNodesByOptions.name'), + value: 'name', + }, + { + label: t('visualOptions.sortNodesByOptions.auto'), + value: 'auto', + }, ], default: 'sizeAscending', }, - verticalAlignment: { type: 'text', - label: 'Flows alignment', + label: t('visualOptions.verticalAlignment'), group: 'chart', options: ['Top', 'Center', 'Bottom'], default: 'Center', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'source', default: { scaleType: 'ordinal', @@ -90,10 +94,9 @@ export const visualOptions = { }, group: 'colors', }, - showValues: { type: 'boolean', - label: 'Show nodes values', + label: t('visualOptions.showValues'), default: false, group: 'Labels', }, diff --git a/src/arcdiagram/dimensions.js b/src/arcdiagram/dimensions.js index 0668ca8a..b7f7b590 100644 --- a/src/arcdiagram/dimensions.js +++ b/src/arcdiagram/dimensions.js @@ -1,19 +1,21 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'source', - name: 'Source node', + name: t('dimensions.sourceNode'), validTypes: ['number', 'date', 'string'], required: true, }, { id: 'target', - name: 'Target node', + name: t('dimensions.targetNode'), validTypes: ['number', 'date', 'string'], required: true, }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: false, aggregation: true, diff --git a/src/arcdiagram/metadata.js b/src/arcdiagram/metadata.js index 95e0a4cc..62df23d0 100644 --- a/src/arcdiagram/metadata.js +++ b/src/arcdiagram/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './arcdiagram.svg' import thumbnail from './arcdiagram_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.arcdiagram', thumbnail, icon, - categories: ['networks'], - description: - 'A particular kind of network graph, allows seeing relationships among nodes. Nodes are displayed on the horizontal axis, and links as clockwise arcs. An arc above the nodes means a connection from the left to the right, while below means a connection from the right node to the left one.', + categories: [t('categories.networks')], + description: t('charts.arcdiagram.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/arcdiagram', tutorial: 'https://rawgraphs.io/learning/how-to-make-an-arc-diagram/', diff --git a/src/arcdiagram/visualOptions.js b/src/arcdiagram/visualOptions.js index 801fb730..23cc7cd9 100644 --- a/src/arcdiagram/visualOptions.js +++ b/src/arcdiagram/visualOptions.js @@ -1,82 +1,96 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 10, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 10, group: 'artboard', }, - minDiameter: { type: 'number', - label: 'Min diameter', + label: t('visualOptions.minDiameter'), default: 2, group: 'chart', }, - maxDiameter: { type: 'number', - label: 'Max diameter', + label: t('visualOptions.maxDiameter'), default: 30, group: 'chart', }, - linkOpacity: { type: 'number', - label: 'Links opacity (0-1)', + label: t('visualOptions.linkOpacity'), default: 0.5, step: 0.1, min: 0, max: 1, group: 'chart', }, - sameSide: { type: 'boolean', - label: 'Arcs only on the top', + label: t('visualOptions.sameSide'), default: false, group: 'chart', }, - nodeSize: { type: 'text', - label: 'Nodes diameter', + label: t('visualOptions.nodeSize'), group: 'chart', options: [ - { label: 'Same size', value: 'default' }, - { label: 'Weighted degree', value: 'totalValue' }, - { label: 'Weighted inDegree', value: 'inValue' }, - { label: 'Weighted outDegree', value: 'outValue' }, - { label: 'Links count', value: 'degree' }, - { label: 'OutDegree', value: 'outDegree' }, - { label: 'InDegree', value: 'inDegree' }, + { + label: t('visualOptions.nodeSizeOptions.default'), + value: 'default', + }, + { + label: t('visualOptions.nodeSizeOptions.totalValue'), + value: 'totalValue', + }, + { + label: t('visualOptions.nodeSizeOptions.inValue'), + value: 'inValue', + }, + { + label: t('visualOptions.nodeSizeOptions.outValue'), + value: 'outValue', + }, + { + label: t('visualOptions.nodeSizeOptions.degree'), + value: 'degree', + }, + { + label: t('visualOptions.nodeSizeOptions.outDegree'), + value: 'outDegree', + }, + { + label: t('visualOptions.nodeSizeOptions.inDegree'), + value: 'inDegree', + }, ], default: 'totalValue', }, - orderNodesBy: { type: 'text', - label: 'Sort nodes by', + label: t('visualOptions.orderNodesBy'), group: 'chart', options: ['Name', 'Links count (degree)', 'Size', 'Minimize overlaps'], default: 'Minimize overlaps', diff --git a/src/barchart/dimensions.js b/src/barchart/dimensions.js index ed03d6c5..708d5d53 100644 --- a/src/barchart/dimensions.js +++ b/src/barchart/dimensions.js @@ -1,25 +1,25 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'bars', - name: 'Bars', + name: t('dimensions.bars'), validTypes: ['number', 'string', 'date'], required: true, operation: 'get', }, - { id: 'size', - name: 'Size', + name: t('dimensions.size'), operation: 'get', validTypes: ['number'], required: false, aggregation: true, aggregationDefault: 'sum', }, - { id: 'color', - name: 'Color', + name: t('dimensions.color'), operation: 'get', validTypes: ['number', 'string', 'date'], required: false, @@ -30,10 +30,9 @@ export const dimensions = [ date: 'csvDistinct', }, }, - { id: 'series', - name: 'Series', + name: t('dimensions.series'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', diff --git a/src/barchart/metadata.js b/src/barchart/metadata.js index bc34ce62..04748433 100644 --- a/src/barchart/metadata.js +++ b/src/barchart/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './barchart.svg' import thumbnail from './barchart_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { thumbnail, icon, id: 'rawgraphs.barchart', - categories: ['correlations'], - description: - 'It displays a categorical dimension and related amounts. Each bar represents a category, width is proportional to the quantitative dimension.', + categories: [t('categories.correlations')], + description: t('charts.barchart.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/barchart', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-barchart/', diff --git a/src/barchart/visualOptions.js b/src/barchart/visualOptions.js index 76aca961..f86ea6ee 100644 --- a/src/barchart/visualOptions.js +++ b/src/barchart/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 20, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 20, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,55 +44,67 @@ export const visualOptions = { showLegend: true, }, }, - padding: { type: 'number', - label: 'Padding', + label: t('visualOptions.padding'), default: 1, group: 'chart', }, - barsOrientation: { type: 'text', - label: 'Bars orientation', + label: t('visualOptions.barsOrientation'), group: 'chart', options: [ - { label: 'Vertically', value: 'vertical' }, - { label: 'Horizontally', value: 'horizontal' }, + { + label: t('visualOptions.barsOrientationOptions.vertical'), + value: 'vertical', + }, + { + label: t('visualOptions.barsOrientationOptions.horizontal'), + value: 'horizontal', + }, ], default: 'vertical', }, - sortBarsBy: { type: 'text', - label: 'Sort bars by', + label: t('visualOptions.sortBarsBy'), group: 'chart', options: [ - { label: 'Size (descending)', value: 'totalDescending' }, - { label: 'Size (ascending)', value: 'totalAscending' }, - { label: 'Name', value: 'name' }, - { label: 'Original', value: 'original' }, + { + label: t('visualOptions.sortBarsByOptions.totalDescending'), + value: 'totalDescending', + }, + { + label: t('visualOptions.sortBarsByOptions.totalAscending'), + value: 'totalAscending', + }, + { + label: t('visualOptions.sortBarsByOptions.name'), + value: 'name', + }, + { + label: t('visualOptions.sortBarsByOptions.original'), + value: 'original', + }, ], default: 'name', }, - useSameScale: { type: 'boolean', - label: 'Use same scale', + label: t('visualOptions.useSameScale'), default: true, group: 'series', }, - columnsNumber: { type: 'number', - label: 'Number of columns', + label: t('visualOptions.columnsNumber'), default: 0, group: 'series', }, - sortSeriesBy: { type: 'text', - label: 'Sort series by', + label: t('visualOptions.sortSeriesBy'), group: 'series', options: [ 'Total value (descending)', @@ -105,31 +114,27 @@ export const visualOptions = { ], default: 'Total value (descending)', }, - showSeriesLabels: { type: 'boolean', - label: 'Show series titles', + label: t('visualOptions.showSeriesLabels'), default: true, group: 'series', }, - repeatAxesLabels: { type: 'boolean', - label: 'Repeat axis labels for each series', + label: t('visualOptions.repeatAxesLabels'), default: false, group: 'series', }, - showGrid: { type: 'boolean', - label: 'Show series grid', + label: t('visualOptions.showSeriesGrid'), default: false, group: 'series', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', diff --git a/src/barchartmultiset/dimensions.js b/src/barchartmultiset/dimensions.js index e370a8bd..34eef568 100644 --- a/src/barchartmultiset/dimensions.js +++ b/src/barchartmultiset/dimensions.js @@ -1,15 +1,16 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'groups', - name: 'Sets', + name: t('dimensions.sets'), validTypes: ['number', 'string', 'date'], required: true, operation: 'get', }, - { id: 'bars', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: true, multiple: true, @@ -19,10 +20,9 @@ export const dimensions = [ number: 'sum', }, }, - { id: 'series', - name: 'Series', + name: t('dimensions.series'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', diff --git a/src/barchartmultiset/metadata.js b/src/barchartmultiset/metadata.js index 9ec551ff..33212ab9 100644 --- a/src/barchartmultiset/metadata.js +++ b/src/barchartmultiset/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './barchartmultiset.svg' import thumbnail from './barchartmultiset_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { thumbnail, icon, id: 'rawgraphs.barchartmultiset', - categories: ['correlations', 'proportions'], - description: - 'It displays multiple quantitative dimensions related to categories. bars are visually grouped in sets according to the categorical dimension, each bar represents a quantitative dimension, mapped on its height.', + categories: [t('categories.correlations'), t('categories.proportions')], + description: t('charts.barchartmultiset.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/barchartmultiset', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-multiset-barchart/', diff --git a/src/barchartmultiset/visualOptions.js b/src/barchartmultiset/visualOptions.js index 717cc644..2ae661c9 100644 --- a/src/barchartmultiset/visualOptions.js +++ b/src/barchartmultiset/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 20, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 20, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,24 +44,21 @@ export const visualOptions = { showLegend: true, }, }, - setsPadding: { type: 'number', - label: 'Padding between sets', + label: t('visualOptions.setsPadding'), default: 4, group: 'chart', }, - barsPadding: { type: 'number', - label: 'Padding between bars', + label: t('visualOptions.barsPadding'), default: 1, group: 'chart', }, - SortXAxisBy: { type: 'text', - label: 'Sort X axis by', + label: t('visualOptions.SortXAxisBy'), group: 'chart', options: [ 'Total value (descending)', @@ -74,58 +68,63 @@ export const visualOptions = { ], default: 'Name', }, - useSameScale: { type: 'boolean', - label: 'Use same scale', + label: t('visualOptions.useSameScale'), default: true, group: 'series', }, - columnsNumber: { type: 'number', - label: 'Number of columns', + label: t('visualOptions.columnsNumber'), default: 0, group: 'series', }, - sortSeriesBy: { type: 'text', - label: 'Sort series by', + label: t('visualOptions.sortSeriesBy'), group: 'series', options: [ - { label: 'Total value (descending)', value: 'valueDescending' }, - { label: 'Total value (ascending)', value: 'valueAscending' }, - { label: 'Name', value: 'name' }, - { label: 'Original', value: 'none' }, + { + label: t('visualOptions.sortSeriesByOptions.valueDescending'), + value: 'valueDescending', + }, + { + label: t('visualOptions.sortSeriesByOptions.valueAscending'), + value: 'valueAscending', + }, + { + label: t('visualOptions.sortSeriesByOptions.name'), + value: 'name', + }, + { + label: t('visualOptions.sortSeriesByOptions.none'), + value: 'none', + }, ], default: 'valueDescending', }, - showSeriesLabels: { type: 'boolean', - label: 'Show series titles', + label: t('visualOptions.showSeriesLabels'), default: true, group: 'series', }, - repeatAxesLabels: { type: 'boolean', - label: 'Repeat axis labels for each series', + label: t('visualOptions.repeatAxesLabels'), default: false, group: 'series', }, - showGrid: { type: 'boolean', - label: 'Show series grid', + label: t('visualOptions.showSeriesGrid'), default: true, group: 'series', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'bars', default: { scaleType: 'ordinal', diff --git a/src/barchartstacked/dimensions.js b/src/barchartstacked/dimensions.js index ecaa69ce..c3f958c6 100644 --- a/src/barchartstacked/dimensions.js +++ b/src/barchartstacked/dimensions.js @@ -1,15 +1,16 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'stacks', - name: 'X Axis', + name: t('dimensions.stacks'), validTypes: ['number', 'string', 'date'], required: true, operation: 'get', }, - { id: 'bars', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: true, multiple: true, @@ -19,10 +20,9 @@ export const dimensions = [ number: 'sum', }, }, - { id: 'series', - name: 'Series', + name: t('dimensions.series'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', diff --git a/src/barchartstacked/metadata.js b/src/barchartstacked/metadata.js index 928822c8..5d3746d2 100644 --- a/src/barchartstacked/metadata.js +++ b/src/barchartstacked/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './barchartstacked.svg' import thumbnail from './barchartstacked_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.barchartstacked', thumbnail, icon, - categories: ['correlations', 'proportions'], - description: - 'It displays multiple quantitative dimensions related to categories. bars are visually stacked according to the categorical dimension, each bar represents a quantitative dimension, mapped on its height.', + categories: [t('categories.correlations'), t('categories.proportions')], + description: t('charts.barchartstacked.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/barchartstacked', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-stacked-barchart/', diff --git a/src/barchartstacked/visualOptions.js b/src/barchartstacked/visualOptions.js index d5e8459a..9e60b086 100644 --- a/src/barchartstacked/visualOptions.js +++ b/src/barchartstacked/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 20, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 20, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,25 +44,22 @@ export const visualOptions = { showLegend: true, }, }, - stacksPadding: { type: 'number', - label: 'Padding', + label: t('visualOptions.stacksPadding'), default: 1, group: 'chart', }, - stacksOrder: { type: 'text', - label: 'Sort stacks by', + label: t('visualOptions.stacksOrder'), group: 'chart', options: ['Earliest', 'Ascending', 'Descending', 'None', 'Reverse'], default: 'None', }, - SortXAxisBy: { type: 'text', - label: 'Sort X axis by', + label: t('visualOptions.SortXAxisBy'), group: 'chart', options: [ 'Total value (descending)', @@ -75,58 +69,63 @@ export const visualOptions = { ], default: 'Name', }, - useSameScale: { type: 'boolean', - label: 'Use same scale', + label: t('visualOptions.useSameScale'), default: true, group: 'series', }, - columnsNumber: { type: 'number', - label: 'Number of columns', + label: t('visualOptions.columnsNumber'), default: 0, group: 'series', }, - sortSeriesBy: { type: 'text', - label: 'Sort series by', + label: t('visualOptions.sortSeriesBy'), group: 'series', options: [ - { label: 'Total value (descending)', value: 'valueDescending' }, - { label: 'Total value (ascending)', value: 'valueAscending' }, - { label: 'Name', value: 'name' }, - { label: 'Original', value: 'none' }, + { + label: t('visualOptions.sortSeriesByOptions.valueDescending'), + value: 'valueDescending', + }, + { + label: t('visualOptions.sortSeriesByOptions.valueAscending'), + value: 'valueAscending', + }, + { + label: t('visualOptions.sortSeriesByOptions.name'), + value: 'name', + }, + { + label: t('visualOptions.sortSeriesByOptions.none'), + value: 'none', + }, ], default: 'valueDescending', }, - showSeriesLabels: { type: 'boolean', - label: 'Show series titles', + label: t('visualOptions.showSeriesLabels'), default: true, group: 'series', }, - repeatAxesLabels: { type: 'boolean', - label: 'Repeat axis labels for each series', + label: t('visualOptions.repeatAxesLabels'), default: false, group: 'series', }, - showGrid: { type: 'boolean', - label: 'Show series grid', + label: t('visualOptions.showSeriesGrid'), default: true, group: 'series', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'bars', default: { scaleType: 'ordinal', diff --git a/src/beeswarm/dimensions.js b/src/beeswarm/dimensions.js index 75873b58..50a98a01 100644 --- a/src/beeswarm/dimensions.js +++ b/src/beeswarm/dimensions.js @@ -1,35 +1,37 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'xValue', - name: 'X Axis', + name: t('dimensions.xValue'), operation: 'get', validTypes: ['number', 'date'], required: true, }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), operation: 'get', validTypes: ['number', 'date'], required: false, }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), operation: 'get', validTypes: ['number', 'string', 'date'], required: false, }, { id: 'label', - name: 'Label', + name: t('dimensions.label'), validTypes: ['number', 'date', 'string'], required: false, multiple: true, }, { id: 'series', - name: 'Groups', + name: t('dimensions.group'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', diff --git a/src/beeswarm/metadata.js b/src/beeswarm/metadata.js index 5790bd2c..647980c0 100644 --- a/src/beeswarm/metadata.js +++ b/src/beeswarm/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './beeswarm.svg' import thumbnail from './beeswarm_thumb.svg' @@ -6,9 +7,12 @@ export const metadata = { id: 'rawgraphs.beeswarm', thumbnail, icon, - categories: ['distributions', 'time series', 'proportions'], - description: - 'It displays the distribution of items over a continuous dimensions. Each (line) is represented with a dot placed on the horizontal axis. The vertical dimension is used to avoid overlaps among circles, showing their distribution. The area of dots can be used to encode a further quantitative dimension and a quantitative or categorical dimension with color.', + categories: [ + t('categories.distributions'), + t('categories.time series'), + t('categories.proportions'), + ], + description: t('charts.beeswarm.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/beeswarm', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-beeswarm-plot/', diff --git a/src/beeswarm/visualOptions.js b/src/beeswarm/visualOptions.js index 21b482a7..3d9f4394 100644 --- a/src/beeswarm/visualOptions.js +++ b/src/beeswarm/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 50, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 50, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,31 +44,27 @@ export const visualOptions = { showLegend: true, }, }, - minDiameter: { type: 'number', - label: 'Min diameter', + label: t('visualOptions.minDiameter'), default: 1, group: 'chart', }, - maxDiameter: { type: 'number', - label: 'Max diameter', + label: t('visualOptions.maxDiameter'), default: 20, group: 'chart', }, - nodePadding: { type: 'number', - label: 'Padding', + label: t('visualOptions.nodePadding'), default: 1, group: 'chart', }, - sortSeriesBy: { type: 'text', - label: 'Sort groups by', + label: t('visualOptions.sortGroupsBy'), group: 'series', options: [ 'Total value (descending)', @@ -81,10 +74,9 @@ export const visualOptions = { ], default: 'Original', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -92,35 +84,39 @@ export const visualOptions = { }, group: 'colors', }, - labelStyles: { type: 'text', - label: 'Label', + label: t('visualOptions.labelStyles'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelStylesOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelStylesOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelStylesOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', repeatFor: 'label', repeatDefault: ['labelPrimary', 'labelSecondary', 'labelItalic'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', }, - autoHideLabels: { type: 'boolean', - label: 'Auto hide labels', + label: t('visualOptions.autoHideLabels'), default: false, group: 'labels', }, -} - -// showLegend, +} // showLegend, // legendWidth, diff --git a/src/boxplot/dimensions.js b/src/boxplot/dimensions.js index 360ae6c0..fec6fadb 100644 --- a/src/boxplot/dimensions.js +++ b/src/boxplot/dimensions.js @@ -1,21 +1,21 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'value', - name: 'Y Axis', + name: t('dimensions.value'), validTypes: ['number'], required: true, }, - { id: 'group', - name: 'Groups', + name: t('dimensions.group'), validTypes: ['number', 'date', 'string'], required: false, }, - { id: 'color', - name: 'Color', + name: t('dimensions.color'), operation: 'get', validTypes: ['number', 'string', 'date'], required: false, diff --git a/src/boxplot/metadata.js b/src/boxplot/metadata.js index 7efc9bda..619bc105 100644 --- a/src/boxplot/metadata.js +++ b/src/boxplot/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './boxplot.svg' import thumbnail from './boxplot_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.boxplot', thumbnail, icon, - categories: ['distributions'], - description: - 'It summarize a quantitative distribution with five standard statistics: the smallest value, lower quartile, median, upper quartile, and largest value.', + categories: [t('categories.distributions')], + description: t('charts.boxplot.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/boxplot', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-boxplot/', } diff --git a/src/boxplot/visualOptions.js b/src/boxplot/visualOptions.js index c09d885c..f5d28aeb 100644 --- a/src/boxplot/visualOptions.js +++ b/src/boxplot/visualOptions.js @@ -1,70 +1,63 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 30, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - barsWidth: { type: 'number', - label: 'Bars width', + label: t('visualOptions.barsWidth'), default: 20, group: 'chart', }, - iqrMultiplier: { type: 'number', - label: 'Interquartile range multiplier', + label: t('visualOptions.iqrMultiplier'), default: 1.5, group: 'chart', }, - dotsDiameter: { type: 'number', - label: 'Dots diameter', + label: t('visualOptions.dotsDiameter'), default: 2, group: 'chart', }, - yOrigin: { type: 'boolean', - label: 'Set Y origin to 0', + label: t('visualOptions.yOrigin'), default: false, group: 'chart', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -75,10 +68,9 @@ export const visualOptions = { showLegend: true, }, }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -86,10 +78,9 @@ export const visualOptions = { }, group: 'colors', }, - showValues: { type: 'boolean', - label: 'Show boxpot values', + label: t('visualOptions.showBoxPlots'), default: true, group: 'labels', }, diff --git a/src/bubblechart/dimensions.js b/src/bubblechart/dimensions.js index 75591242..062bc33d 100644 --- a/src/bubblechart/dimensions.js +++ b/src/bubblechart/dimensions.js @@ -1,37 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'x', - name: 'X Axis', + name: t('dimensions.x'), validTypes: ['number', 'date'], required: true, }, { id: 'y', - name: 'Y Axis', + name: t('dimensions.y'), validTypes: ['number', 'date'], required: true, }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: false, }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['number', 'date', 'string'], required: false, }, { id: 'connectedBy', - name: 'Connection by', + name: t('dimensions.connectedBy'), validTypes: ['number', 'date'], required: false, }, { id: 'label', - name: 'Label', + name: t('dimensions.label'), validTypes: ['number', 'date', 'string'], required: false, multiple: true, diff --git a/src/bubblechart/metadata.js b/src/bubblechart/metadata.js index 6f067ccf..06f0e2a0 100644 --- a/src/bubblechart/metadata.js +++ b/src/bubblechart/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './bubblechart.svg' import thumbnail from './bubblechart_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.bubblechart', thumbnail, icon, - categories: ['correlations', 'proportions'], - description: - 'The basic layout is a scatter plot, which allows to see correlations among two continuous dimensions. A further quantitative dimension with size and a quantitative or categorical dimension with color.', + categories: [t('categories.correlations'), t('categories.proportions')], + description: t('charts.bubblechart.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/bubblechart', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-scatterplot/', diff --git a/src/bubblechart/visualOptions.js b/src/bubblechart/visualOptions.js index bf7e2e24..a36cfa80 100644 --- a/src/bubblechart/visualOptions.js +++ b/src/bubblechart/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 50, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 50, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 50, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,51 +44,45 @@ export const visualOptions = { showLegend: true, }, }, - xOrigin: { type: 'boolean', - label: 'Set X origin to 0', + label: t('visualOptions.xOrigin'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - yOrigin: { type: 'boolean', - label: 'Set Y origin to 0', + label: t('visualOptions.yOrigin'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - maxDiameter: { type: 'number', - label: 'Max diameter', + label: t('visualOptions.maxDiameter'), default: 15, step: 1, group: 'chart', requiredDimensions: ['x', 'y'], }, - showStroke: { type: 'boolean', - label: 'Show stroke', + label: t('visualOptions.showStroke'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - showPoints: { type: 'boolean', - label: 'Show dots on data values', + label: t('visualOptions.showDotsOnData'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - dotsDiameter: { type: 'number', - label: 'Dots diameter', + label: t('visualOptions.dotsDiameter'), default: 2, group: 'chart', disabled: { @@ -99,10 +90,9 @@ export const visualOptions = { }, requiredDimensions: ['x', 'y'], }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -110,31 +100,37 @@ export const visualOptions = { }, group: 'colors', }, - labelStyles: { type: 'text', - label: 'Label', + label: t('visualOptions.labelStyles'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelStylesOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelStylesOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelStylesOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', repeatFor: 'label', repeatDefault: ['labelPrimary', 'labelSecondary', 'labelItalic'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', }, - autoHideLabels: { type: 'boolean', - label: 'Auto hide labels', + label: t('visualOptions.autoHideLabels'), default: false, group: 'labels', }, diff --git a/src/bumpchart/dimensions.js b/src/bumpchart/dimensions.js index dda18133..178a489f 100644 --- a/src/bumpchart/dimensions.js +++ b/src/bumpchart/dimensions.js @@ -1,41 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'x', - name: 'X Axis', + name: t('dimensions.x'), operation: 'get', validTypes: ['number', 'date'], required: true, }, - { id: 'size', - name: 'Size', + name: t('dimensions.size'), operation: 'get', validTypes: ['number'], aggregation: true, aggregationDefault: 'sum', }, - { id: 'rank', - name: 'Ranking', + name: t('dimensions.rank'), operation: 'get', validTypes: ['number'], aggregation: true, aggregationDefault: 'sum', }, - { id: 'streams', - name: 'Streams', + name: t('dimensions.streams'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', }, - { id: 'series', - name: 'Series', + name: t('dimensions.series'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', diff --git a/src/bumpchart/metadata.js b/src/bumpchart/metadata.js index 2fed3089..9c58f8e5 100644 --- a/src/bumpchart/metadata.js +++ b/src/bumpchart/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './bumpchart.svg' import thumbnail from './bumpchart_thumb.svg' @@ -6,9 +7,12 @@ export const metadata = { id: 'rawgraphs.bumpchart', thumbnail, icon, - categories: ['time series', 'correlations', 'proportions'], - description: - 'It allows the comparison of multiple categories over a continuous dimension and the evolution of its sorting. By default, sorting is based on the stream size.', + categories: [ + t('categories.time series'), + t('categories.correlations'), + t('categories.proportions'), + ], + description: t('charts.bumpchart.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/bumpchart', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-bump-chart/', diff --git a/src/bumpchart/visualOptions.js b/src/bumpchart/visualOptions.js index f07ef9d3..5d3edd4b 100644 --- a/src/bumpchart/visualOptions.js +++ b/src/bumpchart/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 20, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 20, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 10, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,71 +44,100 @@ export const visualOptions = { showLegend: true, }, }, - interpolation: { type: 'text', - label: 'Curves type', + label: t('visualOptions.interpolation'), default: 'curveMonotoneX', options: [ - { label: 'Basis', value: 'curveBasis' }, - { label: 'Cardinal', value: 'curveCardinal' }, - { label: 'Catmull–Rom', value: 'curveCatmullRom' }, - { label: 'Linear', value: 'curveLinear' }, - { label: 'Monotone X', value: 'curveMonotoneX' }, - { label: 'Natural', value: 'curveNatural' }, - { label: 'Step', value: 'curveStep' }, - { label: 'Step After', value: 'curveStepAfter' }, - { label: 'Step Before', value: 'curveStepBefore' }, + { + label: t('visualOptions.interpolationOptions.curveBasis'), + value: 'curveBasis', + }, + { + label: t('visualOptions.interpolationOptions.curveCardinal'), + value: 'curveCardinal', + }, + { + label: t('visualOptions.interpolationOptions.curveCatmullRom'), + value: 'curveCatmullRom', + }, + { + label: t('visualOptions.interpolationOptions.curveLinear'), + value: 'curveLinear', + }, + { + label: t('visualOptions.interpolationOptions.curveMonotoneX'), + value: 'curveMonotoneX', + }, + { + label: t('visualOptions.interpolationOptions.curveNatural'), + value: 'curveNatural', + }, + { + label: t('visualOptions.interpolationOptions.curveStep'), + value: 'curveStep', + }, + { + label: t('visualOptions.interpolationOptions.curveStepAfter'), + value: 'curveStepAfter', + }, + { + label: t('visualOptions.interpolationOptions.curveStepBefore'), + value: 'curveStepBefore', + }, ], group: 'chart', }, - streamsOffset: { type: 'text', - label: 'Streams vertical alignment', + label: t('visualOptions.streamsOffset'), group: 'chart', options: [ - { label: 'Expand', value: 'stackOffsetExpand' }, - { label: 'Silhouette', value: 'stackOffsetSilhouette' }, - { label: 'None', value: 'stackOffsetNone' }, + { + label: t('visualOptions.streamsOffsetOptions.stackOffsetExpand'), + value: 'stackOffsetExpand', + }, + { + label: t('visualOptions.streamsOffsetOptions.stackOffsetSilhouette'), + value: 'stackOffsetSilhouette', + }, + { + label: t('visualOptions.streamsOffsetOptions.stackOffsetNone'), + value: 'stackOffsetNone', + }, ], default: 'stackOffsetNone', }, - streamsPadding: { type: 'number', - label: 'Padding', + label: t('visualOptions.streamsPadding'), default: 1, group: 'chart', }, - showYAxis: { type: 'boolean', - label: 'Show Y axis', + label: t('visualOptions.showYAxis'), default: false, group: 'chart', disabled: { streamsOffset: 'stackOffsetSilhouette', }, }, - useSameScale: { type: 'boolean', - label: 'Use same scale', + label: t('visualOptions.useSameScale'), default: true, group: 'series', }, - columnsNumber: { type: 'number', - label: 'Number of columns', + label: t('visualOptions.columnsNumber'), default: 0, group: 'series', }, - sortSeriesBy: { type: 'text', - label: 'Sort series by', + label: t('visualOptions.sortSeriesBy'), group: 'series', options: [ 'Total value (descending)', @@ -121,24 +147,21 @@ export const visualOptions = { ], default: 'Total value (descending)', }, - showSeriesLabels: { type: 'boolean', - label: 'Show series titles', + label: t('visualOptions.showSeriesLabels'), default: true, group: 'series', }, - showGrid: { type: 'boolean', - label: 'Show series grid', + label: t('visualOptions.showSeriesGrid'), default: false, group: 'series', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'streams', default: { scaleType: 'ordinal', @@ -146,17 +169,15 @@ export const visualOptions = { }, group: 'colors', }, - showLabels: { type: 'boolean', - label: 'Show streams labels', + label: t('visualOptions.showStreams'), default: true, group: 'Labels', }, - labelsType: { type: 'text', - label: 'Labels position', + label: t('visualOptions.labelsType'), group: 'Labels', options: ['On path', 'On point'], default: 'On point', @@ -164,10 +185,9 @@ export const visualOptions = { showLabels: false, }, }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'Labels', disabled: { diff --git a/src/circlepacking/dimensions.js b/src/circlepacking/dimensions.js index e5019de4..ad08546d 100644 --- a/src/circlepacking/dimensions.js +++ b/src/circlepacking/dimensions.js @@ -1,14 +1,16 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'hierarchy', - name: 'Hierarchy', + name: t('dimensions.hierarchy'), validTypes: ['number', 'date', 'string'], required: true, multiple: true, }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: false, aggregation: true, @@ -16,7 +18,7 @@ export const dimensions = [ }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['number', 'date', 'string'], required: false, aggregation: true, @@ -28,7 +30,7 @@ export const dimensions = [ }, { id: 'label', - name: 'Label', + name: t('dimensions.label'), validTypes: ['number', 'date', 'string'], required: false, multiple: true, diff --git a/src/circlepacking/metadata.js b/src/circlepacking/metadata.js index 086dcc97..7e77a3ee 100644 --- a/src/circlepacking/metadata.js +++ b/src/circlepacking/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './circlepacking.svg' import thumbnail from './circlepacking_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.circlepacking', thumbnail, icon, - categories: ['hierarchies', 'proportions'], - description: - 'It displays values of leaf nodes of a hierarchical structure by using circles areas. The hierarchical structure is depicted using nested circles. A further quantitative dimension with size and a quantitative or categorical dimension with color.', + categories: [t('categories.hierarchies'), t('categories.proportions')], + description: t('charts.circlepacking.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/circlepacking', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-circle-packing', diff --git a/src/circlepacking/visualOptions.js b/src/circlepacking/visualOptions.js index 5053634c..b0d736dd 100644 --- a/src/circlepacking/visualOptions.js +++ b/src/circlepacking/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 20, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 20, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 20, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 20, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,29 +44,35 @@ export const visualOptions = { showLegend: true, }, }, - padding: { type: 'number', - label: 'Padding', + label: t('visualOptions.padding'), default: 2, group: 'chart', }, - sortCirclesBy: { type: 'text', - label: 'Sort circles by', + label: t('visualOptions.sortCirclesBy'), group: 'chart', options: [ - { label: 'Size (descending)', value: 'descending' }, - { label: 'Size (ascending)', value: 'ascending' }, - { label: 'Original', value: 'original' }, + { + label: t('visualOptions.sortCirclesByOptions.descending'), + value: 'descending', + }, + { + label: t('visualOptions.sortCirclesByOptions.ascending'), + value: 'ascending', + }, + { + label: t('visualOptions.sortCirclesByOptions.original'), + value: 'original', + }, ], default: 'descending', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -77,52 +80,62 @@ export const visualOptions = { }, group: 'colors', }, - labelStyles: { type: 'text', - label: 'Label', + label: t('visualOptions.labelStyles'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelStylesOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelStylesOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelStylesOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', repeatFor: 'label', repeatDefault: ['labelPrimary', 'labelSecondary', 'labelItalic'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', }, - showHierarchyLabels: { type: 'boolean', - label: 'Show hierarchy labels', + label: t('visualOptions.showHierarchyLabels'), default: false, group: 'labels', }, - hierarchyLabelsStyle: { type: 'text', - label: 'Hierarchy labels position', + label: t('visualOptions.hierarchyLabelsStyle'), group: 'labels', options: [ - { label: 'On path', value: 'onPath' }, - { label: 'On point', value: 'onPoint' }, + { + label: t('visualOptions.hierarchyLabelsStyleOptions.onPath'), + value: 'onPath', + }, + { + label: t('visualOptions.hierarchyLabelsStyleOptions.onPoint'), + value: 'onPoint', + }, ], default: 'onPoint', disabled: { showHierarchyLabels: false, }, }, - autoHideLabels: { type: 'boolean', - label: 'Auto hide labels', + label: t('visualOptions.autoHideLabels'), default: false, group: 'labels', }, diff --git a/src/circularDendrogram/dimensions.js b/src/circularDendrogram/dimensions.js index a259e4dd..03f9a43e 100644 --- a/src/circularDendrogram/dimensions.js +++ b/src/circularDendrogram/dimensions.js @@ -1,14 +1,16 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'hierarchy', - name: 'Hierarchy', + name: t('dimensions.hierarchy'), validTypes: ['number', 'date', 'string'], required: true, multiple: true, }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: false, aggregation: true, @@ -16,7 +18,7 @@ export const dimensions = [ }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['number', 'date', 'string'], required: false, aggregation: true, @@ -28,7 +30,7 @@ export const dimensions = [ }, { id: 'label', - name: 'Label', + name: t('dimensions.label'), validTypes: ['number', 'date', 'string'], required: false, multiple: true, diff --git a/src/circularDendrogram/metadata.js b/src/circularDendrogram/metadata.js index bc694b3e..3db955f1 100644 --- a/src/circularDendrogram/metadata.js +++ b/src/circularDendrogram/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './circulardendrogram.svg' import thumbnail from './circulardendrogram_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.circulardendrogram', thumbnail, icon, - categories: ['hierarchies', 'proportions'], - description: - 'It displays hierarchically structured data with a radial tree structure, where the root node is in the center with the hierarchies moving outward. The area of nodes can be used to encode a further quantitative dimension and a quantitative or categorical dimension with color.', + categories: [t('categories.hierarchies'), t('categories.proportions')], + description: t('charts.circularDendrogram.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/circularDendrogram', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-circular-dendrogram/', diff --git a/src/circularDendrogram/visualOptions.js b/src/circularDendrogram/visualOptions.js index 5cb19da8..3a250c4c 100644 --- a/src/circularDendrogram/visualOptions.js +++ b/src/circularDendrogram/visualOptions.js @@ -1,49 +1,45 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 10, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 10, group: 'artboard', }, - maxDiameter: { type: 'number', - label: 'Maximum diameter', + label: t('visualOptions.maxDiameter'), default: 20, group: 'chart', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -54,33 +50,29 @@ export const visualOptions = { showLegend: true, }, }, - layout: { type: 'text', - label: 'Layout algorythm', + label: t('visualOptions.layout'), group: 'chart', options: ['Cluster Dendogram', 'Tree'], default: 'Tree', }, - sortBy: { type: 'text', - label: 'Sort nodes by', + label: t('visualOptions.sortBy'), group: 'chart', options: ['Size (descending)', 'Size (ascending)', 'Name', 'Original'], default: 'Size (descending)', }, - sizeOnlyLeaves: { type: 'boolean', - label: 'Size only leaf nodes', + label: t('visualOptions.sizeOnlyLeaves'), default: true, group: 'chart', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -88,43 +80,57 @@ export const visualOptions = { }, group: 'color', }, - showHierarchyLabels: { type: 'boolean', - label: 'Show hierarchy labels', + label: t('visualOptions.showHierarchyLabels'), default: true, group: 'labels', }, - hierarchyStyle: { type: 'text', - label: 'Hierarchy labels', + label: t('visualOptions.hierarchyStyle'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.hierarchyStyleOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.hierarchyStyleOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.hierarchyStyleOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', }, - labelStyles: { type: 'text', - label: 'Label', + label: t('visualOptions.labelStyles'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelStylesOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelStylesOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelStylesOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', repeatFor: 'label', repeatDefault: ['labelPrimary', 'labelSecondary', 'labelItalic'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', }, diff --git a/src/contourPlot/dimensions.js b/src/contourPlot/dimensions.js index a43a58f6..c819f617 100644 --- a/src/contourPlot/dimensions.js +++ b/src/contourPlot/dimensions.js @@ -1,17 +1,18 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'x', - name: 'X Axis', + name: t('dimensions.x'), validTypes: ['number', 'date'], required: true, }, { id: 'y', - name: 'Y Axis', + name: t('dimensions.y'), validTypes: ['number', 'date'], required: true, - }, - // { + }, // { // id: 'weight', // name: 'Density weight', // validTypes: ['number'], diff --git a/src/contourPlot/metadata.js b/src/contourPlot/metadata.js index 94f57b24..e0c32239 100644 --- a/src/contourPlot/metadata.js +++ b/src/contourPlot/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './contourPlot.svg' import thumbnail from './contourPlot_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.contourplot', thumbnail, icon, - categories: ['correlations', 'distributions'], - description: - 'It shows the estimated density of point clouds, which is especially useful to avoid overplotting in large datasets.', + categories: [t('categories.correlations'), t('categories.distributions')], + description: t('charts.contourPlot.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/contourPlot', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-contour-plot/', diff --git a/src/contourPlot/visualOptions.js b/src/contourPlot/visualOptions.js index 0c48c1ee..ac1e6568 100644 --- a/src/contourPlot/visualOptions.js +++ b/src/contourPlot/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 50, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 50, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 50, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,44 +44,39 @@ export const visualOptions = { showLegend: true, }, }, - xOrigin: { type: 'boolean', - label: 'Set X origin to 0', + label: t('visualOptions.xOrigin'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - yOrigin: { type: 'boolean', - label: 'Set Y origin to 0', + label: t('visualOptions.yOrigin'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - bandwidth: { type: 'number', - label: 'Bandwidth', + label: t('visualOptions.bandwidth'), default: 20, step: 1, min: 1, group: 'chart', requiredDimensions: ['x', 'y'], }, - showPoints: { type: 'boolean', - label: 'Show dots on data values', + label: t('visualOptions.showDotsOnData'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - dotsDiameter: { type: 'number', - label: 'Dots diameter', + label: t('visualOptions.dotsDiameter'), default: 2, group: 'chart', disabled: { @@ -92,10 +84,9 @@ export const visualOptions = { }, requiredDimensions: ['x', 'y'], }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), domain: 'colorDomain', default: { scaleType: 'sequential', @@ -104,18 +95,16 @@ export const visualOptions = { group: 'colors', requiredDimensions: ['x', 'y'], }, - showBandLabels: { type: 'boolean', - label: 'Show band labels', + label: t('visualOptions.showBandLabels'), default: false, group: 'labels', requiredDimensions: ['x', 'y'], }, - labelThresholds: { type: 'number', - label: 'Labels threshold steps', + label: t('visualOptions.labelThresholds'), default: 5, step: 1, min: 1, @@ -125,10 +114,9 @@ export const visualOptions = { }, requiredDimensions: ['x', 'y'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', disabled: { @@ -136,10 +124,9 @@ export const visualOptions = { }, requiredDimensions: ['x', 'y'], }, - autoHideLabels: { type: 'boolean', - label: 'Auto hide labels', + label: t('visualOptions.autoHideLabels'), default: false, group: 'labels', disabled: { diff --git a/src/convexHull/dimensions.js b/src/convexHull/dimensions.js index 1ffb1fb3..97c15655 100644 --- a/src/convexHull/dimensions.js +++ b/src/convexHull/dimensions.js @@ -1,25 +1,27 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'x', - name: 'X Axis', + name: t('dimensions.x'), validTypes: ['number', 'date'], required: true, }, { id: 'y', - name: 'Y Axis', + name: t('dimensions.y'), validTypes: ['number', 'date'], required: true, }, { id: 'group', - name: 'Groups', + name: t('dimensions.group'), validTypes: ['string'], required: false, }, { id: 'label', - name: 'Label', + name: t('dimensions.label'), validTypes: ['number', 'date', 'string'], required: false, multiple: true, diff --git a/src/convexHull/metadata.js b/src/convexHull/metadata.js index 92286377..f78b5697 100644 --- a/src/convexHull/metadata.js +++ b/src/convexHull/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './convexHull.svg' import thumbnail from './convexHull_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.convexhull', thumbnail, icon, - categories: ['correlations', 'proportions'], - description: - 'In mathematics, the convex hull is the smallest convex shape containing a set of points. Applied to a scatterplot, it is useful to identify points belonging to the same category.', + categories: [t('categories.correlations'), t('categories.proportions')], + description: t('charts.convexHull.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/convexHull', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-convex-hulls-chart/', diff --git a/src/convexHull/visualOptions.js b/src/convexHull/visualOptions.js index 9e2a795f..32d3632f 100644 --- a/src/convexHull/visualOptions.js +++ b/src/convexHull/visualOptions.js @@ -1,43 +1,40 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 50, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 50, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 50, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', requiredDimensions: ['x', 'y', 'group'], }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -48,36 +45,32 @@ export const visualOptions = { showLegend: true, }, }, - xOrigin: { type: 'boolean', - label: 'Set X origin to 0', + label: t('visualOptions.xOrigin'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - yOrigin: { type: 'boolean', - label: 'Set Y origin to 0', + label: t('visualOptions.yOrigin'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - groupStrokeWidth: { type: 'number', - label: 'Groups stroke width', + label: t('visualOptions.groupStrokeWidth'), default: 10, step: 1, min: 1, group: 'chart', requiredDimensions: ['x', 'y'], }, - groupOpacity: { type: 'number', - label: 'Fill opacity', + label: t('visualOptions.groupOpacity'), default: 0.5, step: 0.1, min: 0, @@ -85,18 +78,16 @@ export const visualOptions = { group: 'chart', requiredDimensions: ['x', 'y'], }, - showPoints: { type: 'boolean', - label: 'Show dots on data values', + label: t('visualOptions.showDotsOnData'), default: true, group: 'chart', requiredDimensions: ['x', 'y'], }, - dotsDiameter: { type: 'number', - label: 'Dots diameter', + label: t('visualOptions.dotsDiameter'), default: 2, group: 'chart', disabled: { @@ -104,10 +95,9 @@ export const visualOptions = { }, requiredDimensions: ['x', 'y'], }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'group', default: { scaleType: 'ordinal', @@ -116,33 +106,39 @@ export const visualOptions = { group: 'colors', requiredDimensions: ['x', 'y'], }, - labelStyles: { type: 'text', - label: 'Label', + label: t('visualOptions.labelStyles'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelStylesOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelStylesOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelStylesOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', repeatFor: 'label', repeatDefault: ['labelPrimary', 'labelSecondary', 'labelItalic'], requiredDimensions: ['x', 'y', 'label'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', requiredDimensions: ['x', 'y', 'label'], }, - autoHideLabels: { type: 'boolean', - label: 'Auto hide labels', + label: t('visualOptions.autoHideLabels'), default: false, group: 'labels', requiredDimensions: ['x', 'y', 'label'], diff --git a/src/dendrogram/dimensions.js b/src/dendrogram/dimensions.js index e5019de4..ad08546d 100644 --- a/src/dendrogram/dimensions.js +++ b/src/dendrogram/dimensions.js @@ -1,14 +1,16 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'hierarchy', - name: 'Hierarchy', + name: t('dimensions.hierarchy'), validTypes: ['number', 'date', 'string'], required: true, multiple: true, }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: false, aggregation: true, @@ -16,7 +18,7 @@ export const dimensions = [ }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['number', 'date', 'string'], required: false, aggregation: true, @@ -28,7 +30,7 @@ export const dimensions = [ }, { id: 'label', - name: 'Label', + name: t('dimensions.label'), validTypes: ['number', 'date', 'string'], required: false, multiple: true, diff --git a/src/dendrogram/metadata.js b/src/dendrogram/metadata.js index 12871099..a9cc655b 100644 --- a/src/dendrogram/metadata.js +++ b/src/dendrogram/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './dendrogram.svg' import thumbnail from './dendrogram_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.lineardendrogram', thumbnail, icon, - categories: ['hierarchies', 'proportions'], - description: - 'It displays hierarchically structured data with a tree structure, where the root node is on the left and leaves are on the right. The size of nodes can be used to encode a further quantitative dimension with size and a quantitative or categorical dimension with color.', + categories: [t('categories.hierarchies'), t('categories.proportions')], + description: t('charts.dendrogram.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/dendrogram', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-linear-dendrogram/', diff --git a/src/dendrogram/visualOptions.js b/src/dendrogram/visualOptions.js index 80039178..c7016cfd 100644 --- a/src/dendrogram/visualOptions.js +++ b/src/dendrogram/visualOptions.js @@ -1,49 +1,45 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 150, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 10, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 10, group: 'artboard', }, - maxDiameter: { type: 'number', - label: 'Max diameter', + label: t('visualOptions.maxDiameter'), default: 20, group: 'chart', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -54,33 +50,29 @@ export const visualOptions = { showLegend: true, }, }, - layout: { type: 'text', - label: 'Layout algorythm', + label: t('visualOptions.layout'), group: 'chart', options: ['Cluster Dendogram', 'Tree'], default: 'Tree', }, - sortBy: { type: 'text', - label: 'Sort nodes by', + label: t('visualOptions.sortBy'), group: 'chart', options: ['Size (descending)', 'Size (ascending)', 'Name', 'Original'], default: 'Size (descending)', }, - sizeOnlyLeaves: { type: 'boolean', - label: 'Size only leaf nodes', + label: t('visualOptions.sizeOnlyLeaves'), default: true, group: 'chart', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -88,31 +80,37 @@ export const visualOptions = { }, group: 'color', }, - labelStyles: { type: 'text', - label: 'Label', + label: t('visualOptions.labelStyles'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelStylesOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelStylesOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelStylesOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', repeatFor: 'label', repeatDefault: ['labelPrimary', 'labelSecondary', 'labelItalic'], }, - showHierarchyLabels: { type: 'boolean', - label: 'Show hierarchy labels', + label: t('visualOptions.showHierarchyLabels'), default: true, group: 'labels', }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', }, diff --git a/src/ganttChart/dimensions.js b/src/ganttChart/dimensions.js index 2d6c68e9..26fdc4e9 100644 --- a/src/ganttChart/dimensions.js +++ b/src/ganttChart/dimensions.js @@ -1,25 +1,27 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'startDate', - name: 'Start date', + name: t('dimensions.startDate'), validTypes: ['number', 'date'], required: true, }, { id: 'endDate', - name: 'End Date', + name: t('dimensions.endDate'), validTypes: ['number', 'date'], required: true, }, { id: 'group', - name: 'Groups', + name: t('dimensions.group'), validTypes: ['string'], required: false, }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['string'], required: false, }, diff --git a/src/ganttChart/metadata.js b/src/ganttChart/metadata.js index e5b0a960..79ee988f 100644 --- a/src/ganttChart/metadata.js +++ b/src/ganttChart/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './ganttChart.svg' import thumbnail from './ganttChart_thumb.svg' @@ -5,9 +6,8 @@ export const metadata = { name: 'Gantt chart', thumbnail, icon, - categories: ['time series', 'correlations'], - description: - 'A Gantt chart is a type of bar chart, developed by Henry Gantt in the 1910s, that illustrates a project schedule. Gantt charts illustrate the start and finish dates of the terminal elements and summary elements of a project.', + categories: [t('categories.time series'), t('categories.correlations')], + description: t('charts.ganttChart.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/ganttChart', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-gantt-chart/', diff --git a/src/ganttChart/visualOptions.js b/src/ganttChart/visualOptions.js index b286e010..8da0a190 100644 --- a/src/ganttChart/visualOptions.js +++ b/src/ganttChart/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 50, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 50, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 50, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,33 +44,42 @@ export const visualOptions = { showLegend: true, }, }, - sortGroupsBy: { type: 'text', - label: 'Sort groups by', + label: t('visualOptions.sortGroupsBy'), group: 'chart', options: [ - { label: 'Original', value: '' }, - { label: 'Start date (ascending)', value: 'ascending' }, - { label: 'Start date (descending)', value: 'descending' }, - { label: 'Name', value: 'group' }, + { + label: t('visualOptions.sortGroupsByOptions.'), + value: '', + }, + { + label: t('visualOptions.sortGroupsByOptions.ascending'), + value: 'ascending', + }, + { + label: t('visualOptions.sortGroupsByOptions.descending'), + value: 'descending', + }, + { + label: t('visualOptions.sortGroupsByOptions.group'), + value: 'group', + }, ], default: '', }, - barPadding: { type: 'number', - label: 'Padding (%)', + label: t('visualOptions.barPadding'), default: 0, group: 'chart', step: 0.1, min: 0, max: 1, }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -81,10 +87,9 @@ export const visualOptions = { }, group: 'colors', }, - alignLabels: { type: 'boolean', - label: 'Labels position', + label: t('visualOptions.alignLabels'), default: false, group: 'labels', }, diff --git a/src/hexagonalBinning/dimensions.js b/src/hexagonalBinning/dimensions.js index 546d8910..7c3d1ce5 100644 --- a/src/hexagonalBinning/dimensions.js +++ b/src/hexagonalBinning/dimensions.js @@ -1,13 +1,15 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'x', - name: 'X Axis', + name: t('dimensions.x'), validTypes: ['number', 'date'], required: true, }, { id: 'y', - name: 'Y Axis', + name: t('dimensions.y'), validTypes: ['number', 'date'], required: true, }, diff --git a/src/hexagonalBinning/metadata.js b/src/hexagonalBinning/metadata.js index a4e18e8f..db0dcd53 100644 --- a/src/hexagonalBinning/metadata.js +++ b/src/hexagonalBinning/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './hexagonalBinning.svg' import thumbnail from './hexagonalBinning_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.hexagonalbinning', thumbnail, icon, - categories: ['correlations', 'distributions'], - description: - 'Hexagonal Binning is a way to manage the problem of having too many points that start to overlap. Hexagonal binning plots density, rather than points. Points are binned into gridded hexagons and distribution (the number of points per hexagon) is displayed using either the color or the area of the hexagons.', + categories: [t('categories.correlations'), t('categories.distributions')], + description: t('charts.hexagonalBinning.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/hexagonalBinning', tutorial: 'https://rawgraphs.io/learning/how-to-make-an-hexagonal-binning/', diff --git a/src/hexagonalBinning/visualOptions.js b/src/hexagonalBinning/visualOptions.js index d9fd1929..6e30e30b 100644 --- a/src/hexagonalBinning/visualOptions.js +++ b/src/hexagonalBinning/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 50, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 50, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 50, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -48,51 +45,45 @@ export const visualOptions = { }, requiredDimensions: ['x', 'y'], }, - xOrigin: { type: 'boolean', - label: 'Set X origin to 0', + label: t('visualOptions.xOrigin'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - yOrigin: { type: 'boolean', - label: 'Set Y origin to 0', + label: t('visualOptions.yOrigin'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - diameter: { type: 'number', - label: 'Bin diameter', + label: t('visualOptions.diameter'), default: 8, step: 1, group: 'chart', requiredDimensions: ['x', 'y'], }, - weightSize: { type: 'boolean', - label: 'Scale hexagons area', + label: t('visualOptions.weightSize'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - showPoints: { type: 'boolean', - label: 'Show dots on data values', + label: t('visualOptions.showDotsOnData'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - dotsDiameter: { type: 'number', - label: 'Dots diameter', + label: t('visualOptions.dotsDiameter'), default: 2, group: 'chart', disabled: { @@ -100,10 +91,9 @@ export const visualOptions = { }, requiredDimensions: ['x', 'y'], }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), //dimension: 'color', domain: 'colorDomain', default: { @@ -113,26 +103,23 @@ export const visualOptions = { group: 'colors', requiredDimensions: ['x', 'y'], }, - showCountLabels: { type: 'boolean', - label: 'Show count labels', + label: t('visualOptions.showCountLabels'), default: false, group: 'labels', requiredDimensions: ['x', 'y'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', requiredDimensions: ['x', 'y'], }, - autoHideLabels: { type: 'boolean', - label: 'Auto hide labels', + label: t('visualOptions.autoHideLabels'), default: false, group: 'labels', requiredDimensions: ['x', 'y'], diff --git a/src/horizongraph/dimensions.js b/src/horizongraph/dimensions.js index 6df45dbd..2f8e17ee 100644 --- a/src/horizongraph/dimensions.js +++ b/src/horizongraph/dimensions.js @@ -1,23 +1,23 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'x', - name: 'x axis', + name: t('dimensions.x'), validTypes: ['number', 'date'], required: true, }, - { id: 'y', - name: 'y axis', + name: t('dimensions.y'), validTypes: ['number'], aggregation: true, aggregationDefault: 'sum', required: false, }, - { id: 'group', - name: 'Groups', + name: t('dimensions.group'), validTypes: ['number', 'date', 'string'], required: false, }, diff --git a/src/horizongraph/metadata.js b/src/horizongraph/metadata.js index 98f52fd6..1306d2d2 100644 --- a/src/horizongraph/metadata.js +++ b/src/horizongraph/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './horizongraph.svg' import thumbnail from './horizongraph_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.horizongraph', thumbnail, icon, - categories: ['time series', 'correlations'], - description: - 'It displays a quantitative dimension over a continuous interval or time period. Horizon graphs combine position and color to reduce vertical space.', + categories: [t('categories.time series'), t('categories.correlations')], + description: t('charts.horizongraph.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/horizongraph', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-horizon-graph/', diff --git a/src/horizongraph/visualOptions.js b/src/horizongraph/visualOptions.js index c53ff526..e6677e00 100644 --- a/src/horizongraph/visualOptions.js +++ b/src/horizongraph/visualOptions.js @@ -1,78 +1,105 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 20, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 20, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 20, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 20, group: 'artboard', }, - bands: { type: 'number', - label: 'Number of bands', + label: t('visualOptions.bands'), default: 4, group: 'chart', }, - padding: { type: 'number', - label: 'Padding', + label: t('visualOptions.padding'), default: 1, group: 'chart', }, - interpolation: { type: 'text', - label: 'Curve type', + label: t('visualOptions.curveType'), default: 'curveMonotoneX', options: [ - { label: 'Basis', value: 'curveBasis' }, - { label: 'Cardinal', value: 'curveCardinal' }, - { label: 'Catmull–Rom', value: 'curveCatmullRom' }, - { label: 'Linear', value: 'curveLinear' }, - { label: 'Monotone X', value: 'curveMonotoneX' }, - { label: 'Natural', value: 'curveNatural' }, - { label: 'Step', value: 'curveStep' }, - { label: 'Step After', value: 'curveStepAfter' }, - { label: 'Step Before', value: 'curveStepBefore' }, + { + label: t('visualOptions.interpolationOptions.curveBasis'), + value: 'curveBasis', + }, + { + label: t('visualOptions.interpolationOptions.curveCardinal'), + value: 'curveCardinal', + }, + { + label: t('visualOptions.interpolationOptions.curveCatmullRom'), + value: 'curveCatmullRom', + }, + { + label: t('visualOptions.interpolationOptions.curveLinear'), + value: 'curveLinear', + }, + { + label: t('visualOptions.interpolationOptions.curveMonotoneX'), + value: 'curveMonotoneX', + }, + { + label: t('visualOptions.interpolationOptions.curveNatural'), + value: 'curveNatural', + }, + { + label: t('visualOptions.interpolationOptions.curveStep'), + value: 'curveStep', + }, + { + label: t('visualOptions.interpolationOptions.curveStepAfter'), + value: 'curveStepAfter', + }, + { + label: t('visualOptions.interpolationOptions.curveStepBefore'), + value: 'curveStepBefore', + }, ], group: 'chart', }, - negativeStyle: { type: 'text', - label: 'Show negative values as', + label: t('visualOptions.negativeStyle'), group: 'chart', options: [ - { label: 'Mirrored', value: 'mirrored' }, - { label: 'Offset', value: 'top' }, + { + label: t('visualOptions.negativeStyleOptions.mirrored'), + value: 'mirrored', + }, + { + label: t('visualOptions.negativeStyleOptions.top'), + value: 'top', + }, ], default: 'mirrored', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', diff --git a/src/linechart/dimensions.js b/src/linechart/dimensions.js index 00da2fb0..409925fe 100644 --- a/src/linechart/dimensions.js +++ b/src/linechart/dimensions.js @@ -1,33 +1,32 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'x', - name: 'X Axis', + name: t('dimensions.x'), operation: 'get', validTypes: ['number', 'date'], required: true, }, - { id: 'y', - name: 'Y Axis', + name: t('dimensions.y'), operation: 'get', validTypes: ['number', 'date'], required: true, aggregation: true, aggregationDefault: 'sum', }, - { id: 'lines', - name: 'Lines', + name: t('dimensions.lines'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', }, - { id: 'color', - name: 'Color', + name: t('dimensions.color'), operation: 'get', validTypes: ['number', 'string', 'date'], required: false, @@ -38,10 +37,9 @@ export const dimensions = [ date: 'csvDistinct', }, }, - { id: 'series', - name: 'Series', + name: t('dimensions.series'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', diff --git a/src/linechart/metadata.js b/src/linechart/metadata.js index 47aff563..db2c1099 100644 --- a/src/linechart/metadata.js +++ b/src/linechart/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './linechart.svg' import thumbnail from './linechart_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.linechart', thumbnail, icon, - categories: ['time series', 'correlations'], - description: - 'It displays a quantitative dimension over a continuous interval or time period. Colour can be optionally used to encode an additional quantitative or categorical dimension.', + categories: [t('categories.time series'), t('categories.correlations')], + description: t('charts.linechart.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/linechart', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-line-chart/', diff --git a/src/linechart/visualOptions.js b/src/linechart/visualOptions.js index 0d0df834..5088cbf9 100644 --- a/src/linechart/visualOptions.js +++ b/src/linechart/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 15, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 20, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,88 +44,109 @@ export const visualOptions = { showLegend: true, }, }, - showPoints: { type: 'boolean', - label: 'Show dots on data values', + label: t('visualOptions.showDotsOnData'), default: false, group: 'chart', }, - dotsDiameter: { type: 'number', - label: 'Dots diameter', + label: t('visualOptions.dotsDiameter'), default: 2, group: 'chart', disabled: { showPoints: false, }, }, - interpolation: { type: 'text', - label: 'Curve type', + label: t('visualOptions.curveType'), default: 'Linear', options: [ - { label: 'Basis', value: 'Basis' }, - { label: 'Bundle', value: 'Bundle' }, - { label: 'Cardinal', value: 'Cardinal' }, - { label: 'Catmull–Rom', value: 'CatmullRom' }, - { label: 'Linear', value: 'Linear' }, - { label: 'Monotone X', value: 'MonotoneX' }, - { label: 'Natural', value: 'Natural' }, - { label: 'Step', value: 'Step' }, - { label: 'Step After', value: 'StepAfter' }, - { label: 'Step Before', value: 'StepBefore' }, + { + label: t('visualOptions.interpolationOptions.Basis'), + value: 'Basis', + }, + { + label: t('visualOptions.interpolationOptions.Bundle'), + value: 'Bundle', + }, + { + label: t('visualOptions.interpolationOptions.Cardinal'), + value: 'Cardinal', + }, + { + label: t('visualOptions.interpolationOptions.CatmullRom'), + value: 'CatmullRom', + }, + { + label: t('visualOptions.interpolationOptions.Linear'), + value: 'Linear', + }, + { + label: t('visualOptions.interpolationOptions.MonotoneX'), + value: 'MonotoneX', + }, + { + label: t('visualOptions.interpolationOptions.Natural'), + value: 'Natural', + }, + { + label: t('visualOptions.interpolationOptions.Step'), + value: 'Step', + }, + { + label: t('visualOptions.interpolationOptions.StepAfter'), + value: 'StepAfter', + }, + { + label: t('visualOptions.interpolationOptions.StepBefore'), + value: 'StepBefore', + }, ], group: 'chart', }, - yOrigin: { type: 'boolean', - label: 'Set Y origin to 0', + label: t('visualOptions.yOrigin'), default: false, group: 'chart', requiredDimensions: ['y'], }, - columnsNumber: { type: 'number', - label: 'Number of columns', + label: t('visualOptions.columnsNumber'), default: 0, group: 'series', }, - xTicksAuto: { type: 'boolean', - label: 'Auto-place ticks on x axis', + label: t('visualOptions.xTicksAuto'), default: true, group: 'axes', }, - xTicksAmount: { type: 'number', - label: 'Max. ticks on x axis', + label: t('visualOptions.xTicksAmount'), default: 1, group: 'axes', disabled: { xTicksAuto: true, }, }, - xTicksOuter: { type: 'boolean', - label: 'Show min/max on x axis', + label: t('visualOptions.xTicksOuter'), default: false, group: 'axes', disabled: { xTicksAuto: true, }, }, - sortSeriesBy: { type: 'text', - label: 'Sort series by', + label: t('visualOptions.sortSeriesBy'), group: 'series', options: [ 'Total value (descending)', @@ -138,38 +156,33 @@ export const visualOptions = { ], default: 'Total value (descending)', }, - useSameScale: { type: 'boolean', - label: 'Use same scale', + label: t('visualOptions.useSameScale'), default: true, group: 'series', }, - showSeriesLabels: { type: 'boolean', - label: 'Show series titles', + label: t('visualOptions.showSeriesLabels'), default: true, group: 'series', }, - repeatAxesLabels: { type: 'boolean', - label: 'Repeat axis labels for each series', + label: t('visualOptions.repeatAxesLabels'), default: false, group: 'series', }, - showLabels: { type: 'boolean', - label: 'Show labels', + label: t('visualOptions.showLabels'), default: true, group: 'labels', }, - labelsPosition: { type: 'text', - label: 'Labels position', + label: t('visualOptions.labelsPosition'), options: ['inline', 'side'], default: 'inline', group: 'labels', @@ -177,17 +190,15 @@ export const visualOptions = { showLabels: false, }, }, - showGrid: { type: 'boolean', - label: 'Show series grid', + label: t('visualOptions.showSeriesGrid'), default: true, group: 'series', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', diff --git a/src/matrixplot/dimensions.js b/src/matrixplot/dimensions.js index a3797304..82636924 100644 --- a/src/matrixplot/dimensions.js +++ b/src/matrixplot/dimensions.js @@ -1,19 +1,21 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'x', - name: 'X Axis', + name: t('dimensions.x'), validTypes: ['number', 'date', 'string'], required: true, }, { id: 'y', - name: 'Y Axis', + name: t('dimensions.y'), validTypes: ['number', 'date', 'string'], required: true, }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: false, aggregation: true, @@ -21,7 +23,7 @@ export const dimensions = [ }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['number', 'date', 'string'], required: false, aggregation: true, @@ -33,7 +35,7 @@ export const dimensions = [ }, { id: 'label', - name: 'Label', + name: t('dimensions.label'), validTypes: ['number', 'date', 'string'], required: false, multiple: true, diff --git a/src/matrixplot/metadata.js b/src/matrixplot/metadata.js index eed7ca7b..bdd2c352 100644 --- a/src/matrixplot/metadata.js +++ b/src/matrixplot/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './matrixplot.svg' import thumbnail from './heatmap_thumb.svg' @@ -6,9 +7,12 @@ export const metadata = { id: 'rawgraphs.matrixplot', thumbnail, icon, - categories: ['correlations', 'time series', 'proportions'], - description: - 'It allows comparison of two categorical dimensions, disposing them on the horizontal and vertical axes. Each glyph (square or circle) represents a possible correlation among the two dimensions. Associated quantitative variables can be represented with size and/or color.', + categories: [ + t('categories.correlations'), + t('categories.time series'), + t('categories.proportions'), + ], + description: t('charts.matrixplot.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/matrixplot', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-matrix-plot/', diff --git a/src/matrixplot/visualOptions.js b/src/matrixplot/visualOptions.js index 6c0c8629..1d83983a 100644 --- a/src/matrixplot/visualOptions.js +++ b/src/matrixplot/visualOptions.js @@ -1,41 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 100, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 50, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 50, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -46,27 +44,24 @@ export const visualOptions = { showLegend: true, }, }, - rounding: { type: 'number', - label: 'Round Corners', + label: t('visualOptions.rounding'), default: 0, min: 0, max: 100, step: 1, group: 'chart', }, - padding: { type: 'number', - label: 'Padding', + label: t('visualOptions.padding'), default: 2, group: 'chart', }, - sortXAxisBy: { type: 'text', - label: 'Sort X axis by', + label: t('visualOptions.sortXAxisBy'), group: 'chart', options: [ 'Total value (descending)', @@ -76,10 +71,9 @@ export const visualOptions = { ], default: 'Original', }, - sortYAxisBy: { type: 'text', - label: 'Sort Y axis by', + label: t('visualOptions.sortYAxisBy'), group: 'chart', options: [ 'Total value (descending)', @@ -89,38 +83,43 @@ export const visualOptions = { ], default: 'Original', }, - showGrid: { type: 'boolean', - label: 'Show grid', + label: t('visualOptions.showGrid'), default: false, group: 'chart', }, - labelStyles: { type: 'text', - label: 'Label', + label: t('visualOptions.labelStyles'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelStylesOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelStylesOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelStylesOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', repeatFor: 'label', repeatDefault: ['labelPrimary', 'labelSecondary', 'labelItalic'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', diff --git a/src/parallelcoordinates/dimensions.js b/src/parallelcoordinates/dimensions.js index 8eac3628..95c7fd0f 100644 --- a/src/parallelcoordinates/dimensions.js +++ b/src/parallelcoordinates/dimensions.js @@ -1,14 +1,16 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'dimensions', - name: 'Dimensions', + name: t('dimensions.dimensions'), validTypes: ['number', 'date'], required: true, multiple: true, }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['number', 'date', 'string'], required: false, }, diff --git a/src/parallelcoordinates/metadata.js b/src/parallelcoordinates/metadata.js index 62b2222b..f0f468ab 100644 --- a/src/parallelcoordinates/metadata.js +++ b/src/parallelcoordinates/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './parallelcoordinates.svg' import thumbnail from './parallelcoordinates_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.parallelcoordinates', thumbnail, icon, - categories: ['correlations', 'distributions'], - description: - 'It displays multiple continuous dimensions as axes, and each row in the dataset produces a line connecting its values across the axes.', + categories: [t('categories.correlations'), t('categories.distributions')], + description: t('charts.parallelcoordinates.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/parallelcoordinates', tutorial: 'https://rawgraphs.io/learning/how-to-make-parallel-coordinates/', diff --git a/src/parallelcoordinates/visualOptions.js b/src/parallelcoordinates/visualOptions.js index d6c01870..a48deb0b 100644 --- a/src/parallelcoordinates/visualOptions.js +++ b/src/parallelcoordinates/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 20, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 20, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 20, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 20, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,38 +44,40 @@ export const visualOptions = { showLegend: true, }, }, - orientation: { type: 'text', - label: 'Orientation', + label: t('visualOptions.orientation'), group: 'chart', options: [ - { label: 'Vertical', value: 'vertical' }, - { label: 'Horizontal', value: 'horizontal' }, + { + label: t('visualOptions.orientationOptions.vertical'), + value: 'vertical', + }, + { + label: t('visualOptions.orientationOptions.horizontal'), + value: 'horizontal', + }, ], default: 'vertical', }, - strokeWidth: { type: 'number', - label: 'Stroke width', + label: t('visualOptions.strokeWidth'), default: 1, group: 'chart', }, - strokeOpacity: { group: 'chart', type: 'number', - label: 'Lines opacity (0-1)', + label: t('visualOptions.strokeOpacity'), default: 0.5, step: 0.1, min: 0, max: 1, }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', diff --git a/src/piechart/dimensions.js b/src/piechart/dimensions.js index 64a2fcb5..96e446fb 100644 --- a/src/piechart/dimensions.js +++ b/src/piechart/dimensions.js @@ -1,7 +1,9 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'arcs', - name: 'Arcs', + name: t('dimensions.arcs'), validTypes: ['number'], required: true, multiple: true, @@ -11,10 +13,9 @@ export const dimensions = [ number: 'sum', }, }, - { id: 'series', - name: 'Series', + name: t('dimensions.series'), validTypes: ['number', 'date', 'string'], required: false, operation: 'get', diff --git a/src/piechart/metadata.js b/src/piechart/metadata.js index c35b5f1f..685edec8 100644 --- a/src/piechart/metadata.js +++ b/src/piechart/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './piechart.svg' import thumbnail from './piechart_thumb.svg' @@ -6,9 +7,9 @@ export const metadata = { id: 'rawgraphs.piechart', thumbnail, icon, - categories: ['proportions'], - description: - 'It allows you to see the proportions between values that make up a whole, by using arcs composing a circle.', - code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/piechart', + categories: [t('categories.proportions')], + description: t('charts.piechart.description'), + code: + 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/piechart', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-pie-chart/', } diff --git a/src/piechart/visualOptions.js b/src/piechart/visualOptions.js index e0158410..622c3443 100644 --- a/src/piechart/visualOptions.js +++ b/src/piechart/visualOptions.js @@ -1,87 +1,90 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { // Artboard marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 2, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 2, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 2, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { showLegend: false, }, }, - // chart - drawDonut: { type: 'boolean', - label: 'Draw as donuts', + label: t('visualOptions.drawDonut'), default: false, group: 'chart', }, - arcTichkness: { type: 'number', - label: 'Donut thickness', + label: t('visualOptions.arcTichkness'), default: 10, group: 'chart', disabled: { drawDonut: false, }, }, - sortArcsBy: { type: 'text', - label: 'Sort arcs by', + label: t('visualOptions.sortArcsBy'), group: 'series', options: [ - { label: 'Size (descending)', value: 'totalDescending' }, - { label: 'Size (ascending)', value: 'totalAscending' }, - { label: 'Name', value: 'name' }, - { label: 'Original', value: 'original' }, + { + label: t('visualOptions.sortArcsByOptions.totalDescending'), + value: 'totalDescending', + }, + { + label: t('visualOptions.sortArcsByOptions.totalAscending'), + value: 'totalAscending', + }, + { + label: t('visualOptions.sortArcsByOptions.name'), + value: 'name', + }, + { + label: t('visualOptions.sortArcsByOptions.original'), + value: 'original', + }, ], default: 'name', }, - // colors - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), domain: 'colorDomain', default: { scaleType: 'ordinal', @@ -89,48 +92,53 @@ export const visualOptions = { }, group: 'colors', }, - // labels - showSeriesLabels: { type: 'boolean', - label: 'Show pies titles', + label: t('visualOptions.showPiesTitles'), default: true, group: 'labels', }, - showArcValues: { type: 'boolean', - label: 'Show values on arcs', + label: t('visualOptions.showArcValues'), default: false, group: 'labels', }, - // series - sortPiesBy: { type: 'text', - label: 'Sort pies by', + label: t('visualOptions.sortPiesBy'), group: 'series', options: [ - { label: 'Size (descending)', value: 'totalDescending' }, - { label: 'Size (ascending)', value: 'totalAscending' }, - { label: 'Name', value: 'name' }, - { label: 'Original', value: 'original' }, + { + label: t('visualOptions.sortPiesByOptions.totalDescending'), + value: 'totalDescending', + }, + { + label: t('visualOptions.sortPiesByOptions.totalAscending'), + value: 'totalAscending', + }, + { + label: t('visualOptions.sortPiesByOptions.name'), + value: 'name', + }, + { + label: t('visualOptions.sortPiesByOptions.original'), + value: 'original', + }, ], default: 'name', }, - columnsNumber: { type: 'number', - label: 'Grid columns', + label: t('visualOptions.gridColumns'), default: 0, group: 'series', }, - showGrid: { type: 'boolean', - label: 'Show grid', + label: t('visualOptions.showGrid'), default: false, group: 'series', }, diff --git a/src/radarchart/dimensions.js b/src/radarchart/dimensions.js index e1cb6699..371dace4 100644 --- a/src/radarchart/dimensions.js +++ b/src/radarchart/dimensions.js @@ -1,16 +1,17 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'axes', - name: 'Spokes', + name: t('dimensions.axes'), validTypes: ['number'], required: true, multiple: true, minValues: 3, }, - { id: 'color', - name: 'Color', + name: t('dimensions.color'), operation: 'get', validTypes: ['number', 'string', 'date'], required: false, @@ -21,10 +22,9 @@ export const dimensions = [ date: 'csvDistinct', }, }, - { id: 'series', - name: 'Series', + name: t('dimensions.series'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', diff --git a/src/radarchart/metadata.js b/src/radarchart/metadata.js index a49171c6..d00a7122 100644 --- a/src/radarchart/metadata.js +++ b/src/radarchart/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './radarchart.svg' import thumbnail from './radarchart_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.radarchart', thumbnail, icon, - categories: ['correlations'], - description: - 'It displays multiple continuous dimensions as axes starting from the same point and by disposing them radially. Each dimension is represented as an axis starting from the center of the cart. The same scale is applied to all the axes.', + categories: [t('categories.correlations')], + description: t('charts.radarchart.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/radarchart', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-radar-chart/', diff --git a/src/radarchart/visualOptions.js b/src/radarchart/visualOptions.js index 65a1ab12..2db92160 100644 --- a/src/radarchart/visualOptions.js +++ b/src/radarchart/visualOptions.js @@ -1,84 +1,76 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 30, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 20, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 0, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 20, group: 'artboard', }, - showDots: { type: 'boolean', - label: 'Show dots on data values', + label: t('visualOptions.showDotsOnData'), default: true, group: 'chart', }, - dotsDiameter: { type: 'number', - label: 'Dots diameter', + label: t('visualOptions.dotsDiameter'), default: 2, group: 'chart', disabled: { showDots: false, }, }, - innerDiameter: { type: 'number', - label: 'Inner diameter', + label: t('visualOptions.innerDiameter'), default: 0, group: 'chart', }, - interpolation: { type: 'text', - label: 'Curve type', + label: t('visualOptions.curveType'), default: 'Catmull–Rom', options: ['Basis', 'Cardinal', 'Catmull–Rom', 'Linear'], group: 'chart', }, - fillOpacity: { type: 'number', - label: 'Fill opacity', + label: t('visualOptions.fillOpacity'), default: 0.5, step: 0.1, min: 0, max: 1, group: 'chart', }, - labelsPadding: { type: 'number', - label: 'Axis labels padding', + label: t('visualOptions.labelsPadding'), default: 10, group: 'labels', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -86,51 +78,57 @@ export const visualOptions = { }, group: 'colors', }, - columnsNumber: { type: 'number', - label: 'Number of columns', + label: t('visualOptions.columnsNumber'), default: 0, group: 'series', }, - sortSeriesBy: { type: 'text', - label: 'Sort series by', + label: t('visualOptions.sortSeriesBy'), group: 'series', options: [ - { label: 'Total value (descending)', value: 'valueDescending' }, - { label: 'Total value (ascending)', value: 'valueAscending' }, - { label: 'Name', value: 'nameAscending' }, - { label: 'Original', value: 'none' }, + { + label: t('visualOptions.sortSeriesByOptions.valueDescending'), + value: 'valueDescending', + }, + { + label: t('visualOptions.sortSeriesByOptions.valueAscending'), + value: 'valueAscending', + }, + { + label: t('visualOptions.sortSeriesByOptions.nameAscending'), + value: 'nameAscending', + }, + { + label: t('visualOptions.sortSeriesByOptions.none'), + value: 'none', + }, ], default: 'valueDescending', }, - showSeriesLabels: { type: 'boolean', - label: 'Show series titles', + label: t('visualOptions.showSeriesLabels'), default: true, group: 'series', }, - showGrid: { type: 'boolean', - label: 'Show series grid', + label: t('visualOptions.showSeriesGrid'), default: true, group: 'series', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { diff --git a/src/sankeydiagram/dimensions.js b/src/sankeydiagram/dimensions.js index 0668ca8a..b7f7b590 100644 --- a/src/sankeydiagram/dimensions.js +++ b/src/sankeydiagram/dimensions.js @@ -1,19 +1,21 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'source', - name: 'Source node', + name: t('dimensions.sourceNode'), validTypes: ['number', 'date', 'string'], required: true, }, { id: 'target', - name: 'Target node', + name: t('dimensions.targetNode'), validTypes: ['number', 'date', 'string'], required: true, }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: false, aggregation: true, diff --git a/src/sankeydiagram/metadata.js b/src/sankeydiagram/metadata.js index 0af4a369..018e29c8 100644 --- a/src/sankeydiagram/metadata.js +++ b/src/sankeydiagram/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './sankeydiagram.svg' import thumbnail from './sankeydiagram_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.sankeydiagram', thumbnail, icon, - categories: ['networks'], - description: - 'It represents flows among nodes of a network. Nodes are represented as rectangles, the height represents their value. Flows are represented with curved lines whose width is proportional to their value.', + categories: [t('categories.networks')], + description: t('charts.sankeydiagram.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/sankeydiagram', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-sankey-diagram/', diff --git a/src/sankeydiagram/visualOptions.js b/src/sankeydiagram/visualOptions.js index 387b15e8..89f5d5f2 100644 --- a/src/sankeydiagram/visualOptions.js +++ b/src/sankeydiagram/visualOptions.js @@ -1,64 +1,58 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 10, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 10, group: 'artboard', }, - nodesWidth: { type: 'number', - label: 'Nodes width', + label: t('visualOptions.nodesWidth'), default: 5, group: 'chart', }, - nodesPadding: { type: 'number', - label: 'Padding', + label: t('visualOptions.nodesPadding'), default: 5, group: 'chart', }, - alignment: { type: 'text', - label: 'Nodes alignment', + label: t('visualOptions.alignment'), group: 'chart', options: ['Left', 'Right', 'Center', 'Justify'], default: 'Left', }, - iterations: { type: 'number', - label: 'Iterations (attempts to solve overlaps)', + label: t('visualOptions.iterations'), default: 6, group: 'chart', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'source', default: { scaleType: 'ordinal', @@ -66,10 +60,9 @@ export const visualOptions = { }, group: 'colors', }, - showValues: { type: 'boolean', - label: 'Show nodes values', + label: t('visualOptions.showValues'), default: false, group: 'Labels', }, diff --git a/src/slopechart/dimensions.js b/src/slopechart/dimensions.js index 3a14e3b1..37e0dbe7 100644 --- a/src/slopechart/dimensions.js +++ b/src/slopechart/dimensions.js @@ -1,31 +1,33 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'source', - name: 'Source', + name: t('dimensions.source'), validTypes: ['number', 'date'], required: true, }, { id: 'target', - name: 'Target', + name: t('dimensions.target'), validTypes: ['number', 'date'], required: true, }, { id: 'name', - name: 'Label', + name: t('dimensions.name'), validTypes: ['number', 'date', 'string'], required: false, }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['number', 'date', 'string'], required: false, }, { id: 'series', - name: 'Series', + name: t('dimensions.series'), validTypes: ['number', 'string', 'date'], required: false, }, diff --git a/src/slopechart/metadata.js b/src/slopechart/metadata.js index a01bf84e..726d39fe 100644 --- a/src/slopechart/metadata.js +++ b/src/slopechart/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './slopechart.svg' import thumbnail from './slopechart_thumb.svg' @@ -6,9 +7,9 @@ export const metadata = { id: 'rawgraphs.slopechart', thumbnail, icon, - categories: ['correlations'], - description: - 'It allows the comparison of two continuous dimensions showing them as axes, and using a line to show the relationship.', - code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/slopechart', + categories: [t('categories.correlations')], + description: t('charts.slopechart.description'), + code: + 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/slopechart', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-slope-graph/', } diff --git a/src/slopechart/visualOptions.js b/src/slopechart/visualOptions.js index d3af2797..e2d22968 100644 --- a/src/slopechart/visualOptions.js +++ b/src/slopechart/visualOptions.js @@ -1,43 +1,40 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { // Artboard marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 40, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 40, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 10, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 40, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -48,58 +45,50 @@ export const visualOptions = { showLegend: true, }, }, - // chart nonOverlap: { type: 'number', - label: 'Label repelling force', + label: t('visualOptions.nonOverlap'), default: 5, group: 'chart', }, - showDots: { type: 'boolean', - label: 'Show dots', + label: t('visualOptions.showDots'), default: true, group: 'chart', }, - dotsDiameter: { type: 'number', - label: 'Dots diameter', + label: t('visualOptions.dotsDiameter'), default: 5, group: 'chart', disabled: { showDots: false, }, }, - // series - columnsNumber: { type: 'number', - label: 'Grid columns', + label: t('visualOptions.gridColumns'), default: 0, group: 'series', }, - showSeriesLabels: { type: 'boolean', - label: 'Show series titles', + label: t('visualOptions.showSeriesLabels'), default: true, group: 'series', }, - showGrid: { type: 'boolean', - label: 'Show grid', + label: t('visualOptions.showGrid'), default: false, group: 'series', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', diff --git a/src/streamgraph/dimensions.js b/src/streamgraph/dimensions.js index 99a12199..f48d831a 100644 --- a/src/streamgraph/dimensions.js +++ b/src/streamgraph/dimensions.js @@ -1,32 +1,31 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'x', - name: 'X Axis', + name: t('dimensions.x'), operation: 'get', validTypes: ['number', 'date'], required: true, }, - { id: 'size', - name: 'Size', + name: t('dimensions.size'), operation: 'get', validTypes: ['number'], aggregation: true, aggregationDefault: 'sum', }, - { id: 'streams', - name: 'Streams', + name: t('dimensions.streams'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', }, - { id: 'series', - name: 'Series', + name: t('dimensions.series'), validTypes: ['number', 'string', 'date'], required: false, operation: 'get', diff --git a/src/streamgraph/metadata.js b/src/streamgraph/metadata.js index c81050d2..22f04243 100644 --- a/src/streamgraph/metadata.js +++ b/src/streamgraph/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './streamgraph.svg' import thumbnail from './streamgraph_thumb.svg' @@ -6,9 +7,12 @@ export const metadata = { id: 'rawgraphs.streamgraph', thumbnail, icon, - categories: ['time series', 'correlations', 'proportions'], - description: - 'It allows the comparison of multiple categories over a continuous dimension.', + categories: [ + t('categories.time series'), + t('categories.correlations'), + t('categories.proportions'), + ], + description: t('charts.streamgraph.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/streamgraph', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-streamgraph/', diff --git a/src/streamgraph/visualOptions.js b/src/streamgraph/visualOptions.js index 7df4d41d..0a110da5 100644 --- a/src/streamgraph/visualOptions.js +++ b/src/streamgraph/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 20, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 20, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 10, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,78 +44,127 @@ export const visualOptions = { showLegend: true, }, }, - streamsOrder: { type: 'text', - label: 'Sort streams by', + label: t('visualOptions.streamsOrder'), group: 'chart', options: [ - { label: 'Earliest', value: 'stackOrderAppearance' }, - { label: 'Ascending', value: 'stackOrderAscending' }, - { label: 'Descending', value: 'stackOrderDescending' }, - { label: 'Inside out', value: 'stackOrderInsideOut' }, - { label: 'None', value: 'stackOrderNone' }, - { label: 'Reverse', value: 'stackOrderReverse' }, + { + label: t('visualOptions.streamsOrderOptions.stackOrderAppearance'), + value: 'stackOrderAppearance', + }, + { + label: t('visualOptions.streamsOrderOptions.stackOrderAscending'), + value: 'stackOrderAscending', + }, + { + label: t('visualOptions.streamsOrderOptions.stackOrderDescending'), + value: 'stackOrderDescending', + }, + { + label: t('visualOptions.streamsOrderOptions.stackOrderInsideOut'), + value: 'stackOrderInsideOut', + }, + { + label: t('visualOptions.streamsOrderOptions.stackOrderNone'), + value: 'stackOrderNone', + }, + { + label: t('visualOptions.streamsOrderOptions.stackOrderReverse'), + value: 'stackOrderReverse', + }, ], default: 'stackOrderNone', }, - interpolation: { type: 'text', - label: 'Curve type', + label: t('visualOptions.curveType'), default: 'curveMonotoneX', options: [ - { label: 'Basis', value: 'curveBasis' }, - { label: 'Cardinal', value: 'curveCardinal' }, - { label: 'Catmull–Rom', value: 'curveCatmullRom' }, - { label: 'Linear', value: 'curveLinear' }, - { label: 'Monotone X', value: 'curveMonotoneX' }, - { label: 'Natural', value: 'curveNatural' }, - { label: 'Step', value: 'curveStep' }, - { label: 'Step After', value: 'curveStepAfter' }, - { label: 'Step Before', value: 'curveStepBefore' }, + { + label: t('visualOptions.interpolationOptions.curveBasis'), + value: 'curveBasis', + }, + { + label: t('visualOptions.interpolationOptions.curveCardinal'), + value: 'curveCardinal', + }, + { + label: t('visualOptions.interpolationOptions.curveCatmullRom'), + value: 'curveCatmullRom', + }, + { + label: t('visualOptions.interpolationOptions.curveLinear'), + value: 'curveLinear', + }, + { + label: t('visualOptions.interpolationOptions.curveMonotoneX'), + value: 'curveMonotoneX', + }, + { + label: t('visualOptions.interpolationOptions.curveNatural'), + value: 'curveNatural', + }, + { + label: t('visualOptions.interpolationOptions.curveStep'), + value: 'curveStep', + }, + { + label: t('visualOptions.interpolationOptions.curveStepAfter'), + value: 'curveStepAfter', + }, + { + label: t('visualOptions.interpolationOptions.curveStepBefore'), + value: 'curveStepBefore', + }, ], group: 'chart', }, - streamsOffset: { type: 'text', - label: 'Streams vertical alignment', + label: t('visualOptions.streamsOffset'), group: 'chart', options: [ - { label: 'Expand', value: 'stackOffsetExpand' }, - // { label: 'Diverging', value: 'stackOffsetDiverging' }, - { label: 'Silhouette', value: 'stackOffsetSilhouette' }, - { label: 'Wiggle', value: 'stackOffsetWiggle' }, - { label: 'None', value: 'stackOffsetNone' }, + { + label: t('visualOptions.streamsOffsetOptions.stackOffsetExpand'), + value: 'stackOffsetExpand', + }, // { label: 'Diverging', value: 'stackOffsetDiverging' }, + { + label: t('visualOptions.streamsOffsetOptions.stackOffsetSilhouette'), + value: 'stackOffsetSilhouette', + }, + { + label: t('visualOptions.streamsOffsetOptions.stackOffsetWiggle'), + value: 'stackOffsetWiggle', + }, + { + label: t('visualOptions.streamsOffsetOptions.stackOffsetNone'), + value: 'stackOffsetNone', + }, ], default: 'stackOffsetNone', }, - showYAxis: { type: 'boolean', - label: 'Show Y axis', + label: t('visualOptions.showYAxis'), default: false, group: 'chart', }, - useSameScale: { type: 'boolean', - label: 'Use same scale', + label: t('visualOptions.useSameScale'), default: true, group: 'series', }, - columnsNumber: { type: 'number', - label: 'Number of columns', + label: t('visualOptions.columnsNumber'), default: 0, group: 'series', }, - sortSeriesBy: { type: 'text', - label: 'Sort series by', + label: t('visualOptions.sortSeriesBy'), group: 'series', options: [ 'Total value (descending)', @@ -128,24 +174,21 @@ export const visualOptions = { ], default: 'Total value (descending)', }, - showSeriesLabels: { type: 'boolean', - label: 'Show series titles', + label: t('visualOptions.showSeriesLabels'), default: true, group: 'series', }, - showGrid: { type: 'boolean', - label: 'Show series grid', + label: t('visualOptions.showSeriesGrid'), default: false, group: 'series', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'streams', default: { scaleType: 'ordinal', @@ -153,17 +196,15 @@ export const visualOptions = { }, group: 'colors', }, - showLabels: { type: 'boolean', - label: 'Show streams labels', + label: t('visualOptions.showStreams'), default: true, group: 'Labels', }, - labelsType: { type: 'text', - label: 'Labels position', + label: t('visualOptions.labelsType'), group: 'Labels', options: ['On path', 'On point'], default: 'On point', @@ -171,10 +212,9 @@ export const visualOptions = { showLabels: false, }, }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'Labels', disabled: { diff --git a/src/sunburst/dimensions.js b/src/sunburst/dimensions.js index 0149d2b7..8c59cd53 100644 --- a/src/sunburst/dimensions.js +++ b/src/sunburst/dimensions.js @@ -1,14 +1,16 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'hierarchy', - name: 'Hierarchy', + name: t('dimensions.hierarchy'), validTypes: ['number', 'date', 'string'], required: true, multiple: true, }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: false, aggregation: true, @@ -16,7 +18,7 @@ export const dimensions = [ }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['number', 'date', 'string'], required: false, aggregation: true, @@ -28,7 +30,7 @@ export const dimensions = [ }, { id: 'label', - name: 'Leaf label', + name: t('dimensions.leafLabel'), validTypes: ['number', 'date', 'string'], required: false, multiple: true, diff --git a/src/sunburst/metadata.js b/src/sunburst/metadata.js index 119d54d4..51dc521b 100644 --- a/src/sunburst/metadata.js +++ b/src/sunburst/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './sunburst.svg' import thumbnail from './sunburst_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.sunburst', thumbnail, icon, - categories: ['hierarchies', 'proportions'], - description: - 'It displays hierarchically structured data and a related quantitative dimension using concentric circles. The circle in the center represents the root node, with the hierarchies moving outward from the center. The angle of each arc corresponds to the qualitative dimension.', + categories: [t('categories.hierarchies'), t('categories.proportions')], + description: t('charts.sunburst.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/sunburst', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-sunburst-diagram/', diff --git a/src/sunburst/visualOptions.js b/src/sunburst/visualOptions.js index d29a728f..1bea1141 100644 --- a/src/sunburst/visualOptions.js +++ b/src/sunburst/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 10, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 10, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,17 +44,15 @@ export const visualOptions = { showLegend: true, }, }, - padding: { type: 'number', - label: 'Padding', + label: t('visualOptions.padding'), default: 2, group: 'chart', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -65,53 +60,66 @@ export const visualOptions = { }, group: 'colors', }, - showHierarchyLabels: { type: 'boolean', - label: 'Show hierarchy labels', + label: t('visualOptions.showHierarchyLabels'), default: true, group: 'labels', }, - labelHierarchyStyle: { type: 'text', - label: 'Hierarchy labels', + label: t('visualOptions.labelHierarchyStyle'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelHierarchyStyleOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelHierarchyStyleOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelHierarchyStyleOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelItalic', disabled: { showHierarchyLabels: false, }, }, - labelStyles: { type: 'text', - label: 'Label', + label: t('visualOptions.labelStyles'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelStylesOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelStylesOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelStylesOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', repeatFor: 'label', repeatDefault: ['labelPrimary', 'labelSecondary', 'labelItalic'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', }, - autoHideLabels: { type: 'boolean', - label: 'Auto hide labels', + label: t('visualOptions.autoHideLabels'), default: false, group: 'labels', }, diff --git a/src/treemap/dimensions.js b/src/treemap/dimensions.js index e5019de4..ad08546d 100644 --- a/src/treemap/dimensions.js +++ b/src/treemap/dimensions.js @@ -1,14 +1,16 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'hierarchy', - name: 'Hierarchy', + name: t('dimensions.hierarchy'), validTypes: ['number', 'date', 'string'], required: true, multiple: true, }, { id: 'size', - name: 'Size', + name: t('dimensions.size'), validTypes: ['number'], required: false, aggregation: true, @@ -16,7 +18,7 @@ export const dimensions = [ }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['number', 'date', 'string'], required: false, aggregation: true, @@ -28,7 +30,7 @@ export const dimensions = [ }, { id: 'label', - name: 'Label', + name: t('dimensions.label'), validTypes: ['number', 'date', 'string'], required: false, multiple: true, diff --git a/src/treemap/metadata.js b/src/treemap/metadata.js index 072147d4..f8adb08c 100644 --- a/src/treemap/metadata.js +++ b/src/treemap/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './treemap.svg' import thumbnail from './treemap_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.treemap', thumbnail, icon, - categories: ['hierarchies', 'proportions'], - description: - 'It displays hierarchically structured data and a related quantitative dimension. It is composed of an area divided into small rectangles, representing the last level of the tree structure. The rectangles’ size depends on the quantitative dimension.', + categories: [t('categories.hierarchies'), t('categories.proportions')], + description: t('charts.treemap.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/treemap', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-treemap/', } diff --git a/src/treemap/visualOptions.js b/src/treemap/visualOptions.js index 65dc342e..3e013eaf 100644 --- a/src/treemap/visualOptions.js +++ b/src/treemap/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 10, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 10, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,31 +44,43 @@ export const visualOptions = { showLegend: true, }, }, - tiling: { type: 'text', - label: 'Tiling method', + label: t('visualOptions.tiling'), group: 'chart', options: [ - { label: 'Binary', value: 'treemapBinary' }, - { label: 'Dice', value: 'treemapDice' }, - { label: 'Slice', value: 'treemapSlice' }, - { label: 'Slice and dice', value: 'treemapSliceDice' }, - { label: 'Squarify', value: 'treemapSquarify' }, + { + label: t('visualOptions.tilingOptions.treemapBinary'), + value: 'treemapBinary', + }, + { + label: t('visualOptions.tilingOptions.treemapDice'), + value: 'treemapDice', + }, + { + label: t('visualOptions.tilingOptions.treemapSlice'), + value: 'treemapSlice', + }, + { + label: t('visualOptions.tilingOptions.treemapSliceDice'), + value: 'treemapSliceDice', + }, + { + label: t('visualOptions.tilingOptions.treemapSquarify'), + value: 'treemapSquarify', + }, ], default: 'treemapSquarify', }, - padding: { type: 'number', - label: 'Padding', + label: t('visualOptions.padding'), default: 2, group: 'chart', }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -79,31 +88,37 @@ export const visualOptions = { }, group: 'colors', }, - labelStyles: { type: 'text', - label: 'Label', + label: t('visualOptions.labelStyles'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelStylesOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelStylesOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelStylesOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', repeatFor: 'label', repeatDefault: ['labelPrimary', 'labelSecondary', 'labelItalic'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', }, - showHierarchyLabels: { type: 'boolean', - label: 'Show hierarchy labels', + label: t('visualOptions.showHierarchyLabels'), default: false, group: 'labels', }, diff --git a/src/violinplot/dimensions.js b/src/violinplot/dimensions.js index 360ae6c0..fec6fadb 100644 --- a/src/violinplot/dimensions.js +++ b/src/violinplot/dimensions.js @@ -1,21 +1,21 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'value', - name: 'Y Axis', + name: t('dimensions.value'), validTypes: ['number'], required: true, }, - { id: 'group', - name: 'Groups', + name: t('dimensions.group'), validTypes: ['number', 'date', 'string'], required: false, }, - { id: 'color', - name: 'Color', + name: t('dimensions.color'), operation: 'get', validTypes: ['number', 'string', 'date'], required: false, diff --git a/src/violinplot/metadata.js b/src/violinplot/metadata.js index dbe4d40a..3ff69594 100644 --- a/src/violinplot/metadata.js +++ b/src/violinplot/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './violinplot.svg' import thumbnail from './violinplot_thumb.svg' @@ -6,9 +7,8 @@ export const metadata = { id: 'rawgraphs.violinplot', thumbnail, icon, - categories: ['distributions'], - description: - 'It is useful to show the distribution of a numeric dimension. The shape width represents the amount of items with the same value in the dataset.', + categories: [t('categories.distributions')], + description: t('charts.violinplot.description'), code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/violinplot', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-violin-plot/', diff --git a/src/violinplot/visualOptions.js b/src/violinplot/visualOptions.js index f2a84994..83e60829 100644 --- a/src/violinplot/visualOptions.js +++ b/src/violinplot/visualOptions.js @@ -1,62 +1,69 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 10, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 10, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 30, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - padding: { type: 'number', - label: 'Padding', + label: t('visualOptions.padding'), default: 10, group: 'chart', }, - binsNumber: { type: 'number', - label: 'Number of bins', + label: t('visualOptions.binsNumber'), default: 10, group: 'chart', }, - sortGroupsBy: { type: 'text', - label: 'Sort violins by', + label: t('visualOptions.sortViolinsBy'), group: 'chart', options: [ - { label: 'Total value (descending)', value: 'valueDescending' }, - { label: 'Total value (ascending)', value: 'valueAscending' }, - { label: 'Name', value: 'name' }, - { label: 'Original', value: 'none' }, + { + label: t('visualOptions.sortGroupsByOptions.valueDescending'), + value: 'valueDescending', + }, + { + label: t('visualOptions.sortGroupsByOptions.valueAscending'), + value: 'valueAscending', + }, + { + label: t('visualOptions.sortGroupsByOptions.name'), + value: 'name', + }, + { + label: t('visualOptions.sortGroupsByOptions.none'), + value: 'none', + }, ], default: 'valueDescending', }, - interpolation: { type: 'text', - label: 'Curve type', + label: t('visualOptions.curveType'), default: 'Monotone Y', options: [ 'Basis', @@ -72,34 +79,30 @@ export const visualOptions = { ], group: 'chart', }, - showDots: { type: 'boolean', - label: 'Show dots on data values', + label: t('visualOptions.showDotsOnData'), default: false, group: 'chart', }, - dotsDiameter: { type: 'number', - label: 'Dots diameter', + label: t('visualOptions.dotsDiameter'), disabled: { showDots: false, }, default: 2, group: 'chart', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -110,10 +113,9 @@ export const visualOptions = { showLegend: true, }, }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', diff --git a/src/voronoidiagram/dimensions.js b/src/voronoidiagram/dimensions.js index e2b8d2ef..2a95329e 100644 --- a/src/voronoidiagram/dimensions.js +++ b/src/voronoidiagram/dimensions.js @@ -1,25 +1,27 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const dimensions = [ { id: 'x', - name: 'X Axis', + name: t('dimensions.x'), validTypes: ['number', 'date'], required: true, }, { id: 'y', - name: 'Y Axis', + name: t('dimensions.y'), validTypes: ['number', 'date'], required: true, }, { id: 'color', - name: 'Color', + name: t('dimensions.color'), validTypes: ['number', 'date', 'string'], required: false, }, { id: 'label', - name: 'Label', + name: t('dimensions.label'), validTypes: ['number', 'date', 'string'], required: false, multiple: true, diff --git a/src/voronoidiagram/metadata.js b/src/voronoidiagram/metadata.js index 3f263743..a6d1bf58 100644 --- a/src/voronoidiagram/metadata.js +++ b/src/voronoidiagram/metadata.js @@ -1,3 +1,4 @@ +import { t } from '@rawgraphs/rawgraphs-core' import icon from './voronoidiagram.svg' import thumbnail from './voronoidiagram_thumb.svg' @@ -6,9 +7,9 @@ export const metadata = { id: 'rawgraphs.voronoidiagram', thumbnail, icon, - categories: ['Correlations'], - description: - 'It creates the minimum area around each point defined by two variables. When applied to a scatterplot, it is useful to show the distance between points.', - code: 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/voronoidiagram', + categories: [t('categories.correlations')], + description: t('charts.voronoidiagram.description'), + code: + 'https://github.com/rawgraphs/rawgraphs-charts/tree/master/src/voronoidiagram', tutorial: 'https://rawgraphs.io/learning/how-to-make-a-voronoi-diagram/', } diff --git a/src/voronoidiagram/visualOptions.js b/src/voronoidiagram/visualOptions.js index 60cefee8..85e5ba72 100644 --- a/src/voronoidiagram/visualOptions.js +++ b/src/voronoidiagram/visualOptions.js @@ -1,42 +1,39 @@ +import { t } from '@rawgraphs/rawgraphs-core' + export const visualOptions = { marginTop: { type: 'number', - label: 'Margin (top)', + label: t('visualOptions.marginTop'), default: 50, group: 'artboard', }, - marginRight: { type: 'number', - label: 'Margin (right)', + label: t('visualOptions.marginRight'), default: 50, group: 'artboard', }, - marginBottom: { type: 'number', - label: 'Margin (bottom)', + label: t('visualOptions.marginBottom'), default: 50, group: 'artboard', }, - marginLeft: { type: 'number', - label: 'Margin (left)', + label: t('visualOptions.marginLeft'), default: 50, group: 'artboard', }, - showLegend: { type: 'boolean', - label: 'Show legend', + label: t('visualOptions.showLegend'), default: false, group: 'artboard', }, - legendWidth: { type: 'number', - label: 'Legend width', + label: t('visualOptions.legendWidth'), default: 200, group: 'artboard', disabled: { @@ -47,42 +44,37 @@ export const visualOptions = { showLegend: true, }, }, - xOrigin: { type: 'boolean', - label: 'Set X origin to 0', + label: t('visualOptions.xOrigin'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - yOrigin: { type: 'boolean', - label: 'Set Y origin to 0', + label: t('visualOptions.yOrigin'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - showStroke: { type: 'boolean', - label: 'Show stroke', + label: t('visualOptions.showStroke'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - showPoints: { type: 'boolean', - label: 'Show dots on data values', + label: t('visualOptions.showDotsOnData'), default: false, group: 'chart', requiredDimensions: ['x', 'y'], }, - dotsDiameter: { type: 'number', - label: 'Dots diameter', + label: t('visualOptions.dotsDiameter'), default: 2, group: 'chart', disabled: { @@ -90,10 +82,9 @@ export const visualOptions = { }, requiredDimensions: ['x', 'y'], }, - colorScale: { type: 'colorScale', - label: 'Color scale', + label: t('visualOptions.colorScale'), dimension: 'color', default: { scaleType: 'ordinal', @@ -101,31 +92,37 @@ export const visualOptions = { }, group: 'colors', }, - labelStyles: { type: 'text', - label: 'Label', + label: t('visualOptions.labelStyles'), group: 'labels', options: [ - { label: 'Primary', value: 'labelPrimary' }, - { label: 'Secondary', value: 'labelSecondary' }, - { label: 'Italic', value: 'labelItalic' }, + { + label: t('visualOptions.labelStylesOptions.labelPrimary'), + value: 'labelPrimary', + }, + { + label: t('visualOptions.labelStylesOptions.labelSecondary'), + value: 'labelSecondary', + }, + { + label: t('visualOptions.labelStylesOptions.labelItalic'), + value: 'labelItalic', + }, ], default: 'labelPrimary', repeatFor: 'label', repeatDefault: ['labelPrimary', 'labelSecondary', 'labelItalic'], }, - showLabelsOutline: { type: 'boolean', - label: 'Show outline', + label: t('visualOptions.showLabelsOutline'), default: false, group: 'labels', }, - autoHideLabels: { type: 'boolean', - label: 'Auto hide labels', + label: t('visualOptions.autoHideLabels'), default: false, group: 'labels', },