Configuration"
Raymondchao (talk | contribs) |
m (correct highlight (via JWB)) |
||
(12 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
=Overview = | =Overview = | ||
− | Here we list all available | + | Here we list all available [[ZK_Configuration_Reference/zk.xml/The_library-property_Element| library properties]] of Spreadsheet. |
== Chart's Font == | == Chart's Font == | ||
− | For default font might not display your language properly, Spreadsheet allows you to specify fonts used in charts. There are 3 parts of a chart you can specify its font: '''title, legend''', and '''x axis tick'''. Each part has a corresponding library property that you can specify its '''name, style''', and '''size''' in < | + | For default font might not display your language properly, Spreadsheet allows you to specify fonts used in charts. There are 3 parts of a chart you can specify its font: '''title, legend''', and '''x axis tick'''. Each part has a corresponding library property that you can specify its '''name, style''', and '''size''' in <code>zk.xml</code>. Once you put the configuration, it affects to all charts of the whole application. |
'''Example configuration in zk.xml''' | '''Example configuration in zk.xml''' | ||
Line 53: | Line 53: | ||
== Color Picker == | == Color Picker == | ||
− | Users can set a library property, < | + | Users can set a library property, <code>org.zkoss.zss.useColorPickerEx</code>, in <code>zk.xml</code> to specify which color picker used in the whole application. This property only works under Spreadsheet EE. The default value is '''<code>true</code>''', and Spreadsheet uses ColorPicker of EE. If it's <code>false</code>, Spreadsheet uses OSE's ColorPicker. |
ColorPicker of EE: | ColorPicker of EE: | ||
Line 73: | Line 73: | ||
== Preferred Theme == | == Preferred Theme == | ||
since 3.5.0 | since 3.5.0 | ||
− | Currently, ZSS provides the following different themes: '''Default''' (built-in theme) and '''Classic'''. | + | Currently, ZSS provides the following different themes: '''Default''' (built-in theme) and '''Classic''' from [https://github.com/zkoss/zssthemes/releases Github] |
− | [[File:skyline-look-and-feel.png | left | thumb | Default]] | + | [[File:skyline-look-and-feel.png | left | thumb | 300px | Default]] |
− | [[File:classic-look-and-feel.png | left | thumb | Classic]] | + | [[File:classic-look-and-feel.png | left | thumb | 300px | Classic]] |
<div style="clear: both"></div> | <div style="clear: both"></div> | ||
Line 89: | Line 89: | ||
</library-property> | </library-property> | ||
</source> | </source> | ||
+ | |||
+ | == Formula Cache == | ||
+ | since 3.7 | ||
+ | |||
+ | === Importing === | ||
+ | Default value: '''false''' | ||
+ | |||
+ | Set the property to <code>true</code> and ZSS will import the formula cache of an Excel file, and it can reduce the file loading time because ZSS doesn't need to re-evaluate formulas at loading. | ||
+ | |||
+ | <source lang='xml'> | ||
+ | <library-property> | ||
+ | <name>org.zkoss.zss.import.cache</name> | ||
+ | <value>true</value> | ||
+ | </library-property> | ||
+ | </source > | ||
+ | |||
+ | Few things need to be noticed: | ||
+ | # If some functions not yet supported by ZK Spreadsheet are used in a formula, re-evaluation breaks the cached value even if precedent cells do not change. | ||
+ | # If some customized function '''only''' supported in ZK Spreadsheet are used in a formula, a cache is always <code>#NAME!</code> error. Users must enforce re-evaluation by calling <code>Range.refresh(true, true, true)</code>. | ||
+ | |||
+ | === Exporting === | ||
+ | Default value: '''false''' | ||
+ | |||
+ | Set the property to <code>true</code> and ZSS will export the formula cache into an Excel file. | ||
+ | <source lang='xml'> | ||
+ | <library-property> | ||
+ | <name>org.zkoss.zss.export.cache</name> | ||
+ | <value>true</value> | ||
+ | </library-property> | ||
+ | </source > | ||
+ | |||
+ | == Keep Cell Selection == | ||
+ | <!-- http://tracker.zkoss.org/browse/ZSS-1044 --> | ||
+ | since 3.8.1 | ||
+ | Default value: '''true''' | ||
+ | |||
+ | Set the property to <code>false</code> and ZSS will set default value of ''keepCellSelection'' attribute to false. Before version 3.8.1, when ZK Spreadsheet component loses its focus, it will hide the cell selection mark automatically. However, sometimes an end user would need to know which range is selected when he/she is operating on another control component (e.g. a dialog window). We have set the default value of <code>keepCellSelection</code> to true to avoid the confusion. However, if you would like ZSS to behavior as before version 3.8.1, you can set this property to <code>false</code>. | ||
+ | |||
+ | <source lang='xml'> | ||
+ | <library-property> | ||
+ | <name>org.zkoss.zss.ui.keepCellSelection</name> | ||
+ | <value>false</value> <!-- turn the keep-cell-selection off; default is true if not specified --> | ||
+ | </library-property> | ||
+ | </source > | ||
{{ZKSpreadsheetEssentialsPageFooter}} | {{ZKSpreadsheetEssentialsPageFooter}} |
Latest revision as of 12:51, 19 January 2022
Overview
Here we list all available library properties of Spreadsheet.
Chart's Font
For default font might not display your language properly, Spreadsheet allows you to specify fonts used in charts. There are 3 parts of a chart you can specify its font: title, legend, and x axis tick. Each part has a corresponding library property that you can specify its name, style, and size in zk.xml
. Once you put the configuration, it affects to all charts of the whole application.
Example configuration in zk.xml
<library-property>
<name>org.zkoss.zss.chart.title.font</name>
<value>sansserif, italic, 30</value>
</library-property>
- The above configuration sets title font to italic SansSerif with size 30.
Available property names:
Name | Which font in chart |
---|---|
org.zkoss.zss.chart.title.font |
|
org.zkoss.zss.chart.legend.font |
|
org.zkoss.zss.chart.xAxisTick.font |
|
Value's format:
[NAME], [STYLE], [SIZE]
- [NAME] : Those font names your system supports.
- [STYLE] : plain, bold, italic
- If you specify a incorrect format in the property value, the property will be ignored.
Color Picker
Users can set a library property, org.zkoss.zss.useColorPickerEx
, in zk.xml
to specify which color picker used in the whole application. This property only works under Spreadsheet EE. The default value is true
, and Spreadsheet uses ColorPicker of EE. If it's false
, Spreadsheet uses OSE's ColorPicker.
ColorPicker of EE:
ColorPicker of OSE (fewer color choices):
Example in zk.xml
<library-property>
<name>org.zkoss.zss.colorPickerExUsed</name>
<value>false</value>
</library-property>
- The configuration above will make Spreadsheet use Color Picker of CE.
Preferred Theme
since 3.5.0
Currently, ZSS provides the following different themes: Default (built-in theme) and Classic from Github
Library property could be used to assign a preferred theme which is registered.
Example in zk.xml
<library-property>
<name>org.zkoss.zss.theme.preferred</name>
<value>classic</value>
</library-property>
Formula Cache
since 3.7
Importing
Default value: false
Set the property to true
and ZSS will import the formula cache of an Excel file, and it can reduce the file loading time because ZSS doesn't need to re-evaluate formulas at loading.
<library-property>
<name>org.zkoss.zss.import.cache</name>
<value>true</value>
</library-property>
Few things need to be noticed:
- If some functions not yet supported by ZK Spreadsheet are used in a formula, re-evaluation breaks the cached value even if precedent cells do not change.
- If some customized function only supported in ZK Spreadsheet are used in a formula, a cache is always
#NAME!
error. Users must enforce re-evaluation by callingRange.refresh(true, true, true)
.
Exporting
Default value: false
Set the property to true
and ZSS will export the formula cache into an Excel file.
<library-property>
<name>org.zkoss.zss.export.cache</name>
<value>true</value>
</library-property>
Keep Cell Selection
since 3.8.1
Default value: true
Set the property to false
and ZSS will set default value of keepCellSelection attribute to false. Before version 3.8.1, when ZK Spreadsheet component loses its focus, it will hide the cell selection mark automatically. However, sometimes an end user would need to know which range is selected when he/she is operating on another control component (e.g. a dialog window). We have set the default value of keepCellSelection
to true to avoid the confusion. However, if you would like ZSS to behavior as before version 3.8.1, you can set this property to false
.
<library-property>
<name>org.zkoss.zss.ui.keepCellSelection</name>
<value>false</value> <!-- turn the keep-cell-selection off; default is true if not specified -->
</library-property>
All source code listed in this book is at Github.