欢迎图片

Changes for page Lua Script

Last modified by Devin Chen on 2025/11/10 16:04

From version 9.1
edited by xingzhi lin
on 2025/10/31 11:32
Change comment: There is no comment for this version
To version 11.1
edited by xingzhi lin
on 2025/11/03 11:23
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -8008,36 +8008,172 @@
8008 8008  
8009 8009  == chart.setAlarmBtnSpacing ==
8010 8010  
8011 -**Prototype : **user_secure.usersecure_getInfo()
8011 +**Prototype : **chart.setAlarmBtnSpacing(partname, spacing)
8012 8012  
8013 -**Function: **Connect to a DB file.(If the file does not exist)
8013 +**Function: **Set the spacing between new alarm buttons
8014 8014  
8015 8015  **Parameters**:
8016 8016  
8017 -* dbFilePath (string): Full path to the DB file to connect to (create)
8017 +* (((
8018 +partname(string): Component name
8019 +)))
8020 +* (((
8021 +spacing(int): Button spacing (unit: px (pixels))
8022 +)))
8018 8018  
8019 8019  **Return: **
8020 8020  
8021 -* Success: database object
8022 -* Failure: Returns nil and error.
8026 +* Success: User data table
8027 +* Failure: Returns nil
8023 8023  
8024 8024  **Example**
8025 8025  
8026 8026  {{code language="LUA"}}
8027 -sql = require "Luasqlite" -- Introducing the lua libraries  
8028 -env = sql.sqlite3() -- Get the environment class
8032 +chart.setAlarmBtnSpacing("1_ALM_0", 5)
8029 8029  {{/code}}
8030 8030  
8031 8031  == chart.setAlarmBtnScale ==
8032 8032  
8037 +
8038 +**Prototype : **chart.setAlarmBtnScale(partname, scale)
8039 +
8040 +**Function: **Set the new alarm button size scaling
8041 +
8042 +**Parameters**:
8043 +
8044 +* (((
8045 +partname(string): Component name
8046 +)))
8047 +* (((
8048 +scale(double): Scaling factor, default is 1, range [0.1, 5]
8049 +)))
8050 +
8051 +**Return: **
8052 +
8053 +* Success: True
8054 +* Failure: False
8055 +
8056 +**Example**
8057 +
8058 +{{code language="LUA"}}
8059 +chart.setAlarmBtnScale("1_ALM_0", 1.5)
8060 +{{/code}}
8061 +
8062 +
8033 8033  == chart.setFormulaBtnSpacing ==
8034 8034  
8065 +
8066 +**Prototype : **chart.setFormulaBtnSpacing(partname, spacing)
8067 +
8068 +**Function: **Set the spacing between new formula buttons
8069 +
8070 +**Parameters**:
8071 +
8072 +* (((
8073 +partname(string): Component name
8074 +)))
8075 +* (((
8076 +spacing(int): Button spacing (unit: px (pixels))
8077 +)))
8078 +
8079 +**Return: **
8080 +
8081 +* Success: True
8082 +* Failure: False
8083 +
8084 +**Example**
8085 +
8086 +
8087 +{{code language="LUA"}}
8088 +chart.setFormulaBtnSpacing("2_FOA_0", 5)
8089 +{{/code}}
8090 +
8035 8035  == chart.setFormulaBtnScale ==
8036 8036  
8093 +
8094 +**Prototype : **chart.setFormulBtnScale(partname, scale)
8095 +
8096 +**Function: **Set the formula button size scaling
8097 +
8098 +**Parameters**:
8099 +
8100 +* (((
8101 +partname(string): Component name
8102 +)))
8103 +* (((
8104 +scale(double): Scaling factor, default is 1, range [0.1, 5]
8105 +)))
8106 +
8107 +**Return: **
8108 +
8109 +* Success: True
8110 +* Failure: False
8111 +
8112 +**Example**
8113 +
8114 +
8115 +{{code language="LUA"}}
8116 +chart.setFormulaBtnScale("2_FOA_0", 1.5)
8117 +{{/code}}
8118 +
8037 8037  == chart.setBarChartBtnSpacing ==
8038 8038  
8121 +
8122 +**Prototype : **chart.setBarChartBtnSpacing(partname, spacing)
8123 +
8124 +**Function: **Set the spacing between new barchart buttons
8125 +
8126 +**Parameters**:
8127 +
8128 +* (((
8129 +partname(string): Component name
8130 +)))
8131 +* (((
8132 +spacing(int): Button spacing (unit: px (pixels))
8133 +)))
8134 +
8135 +**Return: **
8136 +
8137 +* Success: True
8138 +* Failure: False
8139 +
8140 +**Example**
8141 +
8142 +
8143 +{{code language="LUA"}}
8144 +chart.setBarChartBtnSpacing("0_BC_0", 5)
8145 +{{/code}}
8146 +
8039 8039  == chart.setBarChartBtnScale ==
8040 8040  
8149 +
8150 +
8151 +**Prototype : **chart.setBarChartBtnScale(partname, scale)
8152 +
8153 +**Function: **Set the barchart button size scaling
8154 +
8155 +**Parameters**:
8156 +
8157 +* (((
8158 +partname(string): Component name
8159 +)))
8160 +* (((
8161 +scale(double): Scaling factor, default is 1, range [0.1, 5]
8162 +)))
8163 +
8164 +**Return: **
8165 +
8166 +* Success: True
8167 +* Failure: False
8168 +
8169 +**Example**
8170 +
8171 +
8172 +
8173 +{{code language="LUA"}}
8174 +chart.setBarChartBtnScale("0_BC_0", 1.5)
8175 +{{/code}}
8176 +
8041 8041  = Environment operation =
8042 8042  
8043 8043  (% class="wikigeneratedid" id="HGetsqliteenvironment" %)