Skip to content

Commit bb058d9

Browse files
committed
[update] complete docs on formulas popup
1 parent ec7ac04 commit bb058d9

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

docs/assets/formula_popup.png

11.9 KB
Loading

docs/functions.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,9 +1311,17 @@ Check the example in our [snippet tool](https://snippet.dhtmlx.com/wux2b35b).
13111311

13121312
## Getting cell formula
13131313

1314-
Starting with v4.1, you can get the formula applied to a cell via the [getFormula()](api/spreadsheet_getformula_method.md) method. The method takes the id of the cell as a parameter:
1314+
Starting with v4.1, you can get the formula applied to a cell via the [`getFormula()`](api/spreadsheet_getformula_method.md) method. The method takes the id of the cell as a parameter:
13151315

1316-
```js
1316+
~~~js
13171317
var formula = spreadsheet.getFormula("B2");
13181318
// -> "ABS(C2)"
1319-
```
1319+
~~~
1320+
1321+
## Popup with formula description
1322+
1323+
When you enter a formula, a popup with description of the function and its parameters appears.
1324+
1325+
![Popup with formula description](assets/formula_popup.png)
1326+
1327+
You can modify the default locale for the popup with formula parameters and add a custom locale. Check the details in the [Localization](localization.md/#default-locale-for-formulas) guide.

docs/localization.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ dhx.i18n.setLocale("spreadsheet", ru);
197197
const spreadsheet = new dhx.Spreadsheet("spreadsheet_container");
198198
~~~
199199

200-
## Default formulas locale
200+
## Default locale for formulas
201201

202202
The i18n locale for the Spreadsheet popup with formulas is contained in the `dhx.i18n.formulas` object. The default locale for formulas is the following:
203203

@@ -227,13 +227,13 @@ const en = {
227227
"Optional. A number or cell reference that refers to numeric values."
228228
]
229229
],
230-
// more formulas settings
230+
// more formulas' descriptions
231231
};
232232
~~~
233233

234234
You can check the full default locale for formulas in the [HTML tab of the related snippet](https://snippet.dhtmlx.com/yn5hyyim).
235235

236-
## Custom formulas locale
236+
## Custom locale for formulas
237237

238238
To apply a custom locale for Spreadsheet formulas, you need to use the `dhx.i18n.setLocale()` method in the following way:
239239

@@ -261,7 +261,7 @@ You should pass the following parameters to the method:
261261
</tr>
262262
<tr>
263263
<td>locale</td>
264-
<td>(*required*) the locale object that contains formulas descriptions as <i>key:value</i> pairs, where:<ul><li>the <b>key</b> is the name of the formula</li><li>the <b>value</b> is an array of parameters the formula takes. Each parameter of the formula is an array of two elements, where:<ul><li>the first element is the name of the parameter</li><li>the second element is the description of the parameter</li></ul></li></ul></td>
264+
<td>(*required*) the locale object that contains formulas' descriptions as <i>key:value</i> pairs, where:<ul><li>the <b>key</b> is the name of the function</li><li>the <b>value</b> is an array of parameters the function takes. Each parameter of the function is an array of two elements, where:<ul><li>the first element is the name of the parameter</li><li>the second element is the description of the parameter</li></ul></li></ul></td>
265265
</tr>
266266
</tbody>
267267
</table>
@@ -274,7 +274,7 @@ const de = {
274274
["Zahl1", "Erforderlich. Eine Zahl oder Zellreferenz, die sich auf numerische Werte bezieht."],
275275
["Zahl2", "Optional. Eine Zahl oder Zellreferenz, die auf numerische Werte verweist."]
276276
],
277-
// other formulas settings
277+
// other formulas' descriptions
278278
};
279279

280280
dhx.i18n.setLocale("formulas", de);

0 commit comments

Comments
 (0)