diff --git a/locales/en/translation.json b/locales/en/translation.json index 8c6f03f..85437b6 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -6,6 +6,7 @@ "parsingError": "There was an error parsing the Chart inputs.", "viewConsoleDetails": "View console for details.", "downloadFiltered": "Download visible", - "downloadAll": "Download all" + "downloadAll": "Download all", + "resetStates": "Reset states" } } \ No newline at end of file diff --git a/locales/fr/translation.json b/locales/fr/translation.json index b19a7e0..cf98948 100644 --- a/locales/fr/translation.json +++ b/locales/fr/translation.json @@ -6,6 +6,7 @@ "parsingError": "Une erreur est survenue lors de la lecture des paramètres.", "viewConsoleDetails": "Voir détails dans la console.", "downloadFiltered": "Télécharger visuel", - "downloadAll": "Télécharger tout" + "downloadAll": "Télécharger tout", + "resetStates": "Réinitialiser états" } } \ No newline at end of file diff --git a/schema-inputs.json b/schema-inputs.json index 00237c2..6226f44 100644 --- a/schema-inputs.json +++ b/schema-inputs.json @@ -78,7 +78,8 @@ }, "useSteps": { "description": "Indicates if the line chart should use steps - supported values are: 'before', 'middle', 'after', false", - "enum": ["before", "after", "middle", false] + "enum": ["before", "after", "middle", false], + "default": false }, "tension": { "description": "Indicates if the line chart should use tension when drawing the line between the values", @@ -94,7 +95,8 @@ }, "type": { "description": "Indicates the type of axis - supported values are: 'linear', 'time', 'timeseries', 'logarithmic', 'category'", - "type": "string" + "type": "string", + "default": "linear" }, "label": { "description": "Indicates the text in the user interface that should be shown for the axis", diff --git a/src/chart.tsx b/src/chart.tsx index 268245e..299223c 100644 --- a/src/chart.tsx +++ b/src/chart.tsx @@ -1291,7 +1291,10 @@ export function GeoChart< /** * Handles when the download button is clicked - * @param value number Indicates the button drop down selection index when it was clicked + * @param index number Indicates the button drop down selection index when it was clicked. + * For our button usage: + * - 0: Means 'download view' was selected when button was clicked + * - 1: Means 'download all' was selected when button was clicked */ const handleDownloadClick = (index: number): void => { // Get the data @@ -1516,7 +1519,7 @@ export function GeoChart< if (inputs?.ui?.resetStates) { return ( ); }