Skip to content

lib-ui 库参考 ​

原文: https://finproducts.atlassian.net/wiki/spaces/JIDD3/pages/34793226400/FIN+5.3.1+lib-ui 中文整理基于 FIN 5.3.1

导读: 支持 Fresco UI

以下为 API 参考,保留英文以便对照源码;目录已列出(英文标题便于检索);概述已尽量中译。


目录(导读) ​

  • lib
  • meta
  • tags
  • funcs
  • views
  • def
  • enum
  • supertypes
  • favEdit(dict)
  • favNew(dict)
  • favTrash(refs)
  • iconUri(name, style, color)
  • uiLink(req)
  • uiLinkAbs(req)
  • vizAutoRange(min, max)
  • vizInterpolateRgb(colors, val)
    • src

概述(中译) ​

支持 Fresco UI


API 正文(英文) ​

tags ​

chartAreaModeEnumeration for how to renders an area fill for a line plot series Note
chartGroupGroup name used to explicitly group series into one chart
chartHeightFixes the height of a chart plot
chartLegendProvides option to control legend on charts
chartLegendNoSortDisable sorting series by their display name in the legend
chartMaxDefine explicit max value for series axis
chartMinDefine explicit min value for series axis
chartNoScrollDisable scrollbars in viz charts
chartTypeEnumerated chart type such as "line" or "bar"
excludeMarks a series are excluded from the chart
formatPattern used to format a value via format()
noDataMessage string when no data available
opacityAlpha transparency for colors as number between 0.0 (transparent) to 1.0 (completely opaque)
strokeDasharrayComma separated lengths of dashs and gaps for rendering lines such as "6,4"
strokeWidthStroke width for rendering lines
subtitleDefines subtitle string for visualizations
titleDefines title string for visualizations
uiMetaSingleton used to configure project level user interface settings

funcs ​

favEditEdit a favotie record
favNewCreate a new fav record action
favTrashTrash a favorite record
iconUriCreate a virtual file URI to an icon
uiLinkHost relative URI to hyperlink to a Fresco view - see Export
uiLinkAbsConvenience for httpSiteUri() + uiLink() to generate an absolute URI hyperlink
vizAutoRangeReturn the automatic axis range of a min, max number
vizInterpolateRgbInterpolate a heatmap color using the RGB color model

views ​

appsApp builder used to edit application view groupings
backupsExecute and manage project database backups
codeEditorEditor for Axon functions
debugExtsDebug the installed extensions
debugFolioDebug the Folio database and the JIT indexing
debugProjDebug the project actor pools
extSettingsEnable and disable project extensions
favsManage saved favorite views
filesBrowse the virtual file system
lintView lint errors to validate your database
projAdminAdmin tools for the current project
projSettingsSettings for the project configured on projMeta
shellAxon interactive shell to evaluate and visualize expressions
sitesSite builder used to edit the site/space/equip/point model
tagsTag builder used to edit project tag definitions
trashView and restore records which have been moved to the trash
uiSettingsSettings for the user interfactor configured on uiMeta
usingSettingsManage Xeto libraries
viewsView builder used to edit customized views in the local project


def ​

chartAreaMode ​

Enumeration for how to renders an area fill for a line plot series Note: nextSeries/prevSeries mode does not support NA data gaps


meta ​

defchartAreaMode
enumSee below
isstr
liblib:ui

enum ​

noneno area fill
axisMinfill area down to the min value of the y-axis
axisMaxfill area up to the max value of the y-axis
zerofill area up to the zero position on y-axis
nextSeriesfill area to the next series in the plot
prevSeriesfill area from the previous series in the plot

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

chartGroup ​

Group name used to explicitly group series into one chart. See Charts.


meta ​

defchartGroup
isstr
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

chartHeight ​

Fixes the height of a chart plot. This tag must be applied to all series within the plot. It is mesaured in SVG logical units which same as pixels when rendering to the screen. See Charts.


meta ​

defchartHeight
isnumber
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
numberInteger or floating point numbers annotated with an optional unit


def ​

chartLegend ​

Provides option to control legend on charts. See Charts.


meta ​

defchartLegend
enumSee below
isstr
liblib:ui

enum ​

autolegend is displayed automatically if there is room
hidelegend is not displayed

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

chartLegendNoSort ​

Disable sorting series by their display name in the legend. This forces ordering of the series within one plot based on the grid column ordering. Note that if multiple plots are overlaid into one chart, the legend will still by ordered by the plot level. See Charts.


meta ​

defchartLegendNoSort
ismarker
liblib:ui

supertypes ​

markerMarker labels a dict with typing information


def ​

chartMax ​

Define explicit max value for series axis. See Charts.


meta ​

defchartMax
isnumber
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
numberInteger or floating point numbers annotated with an optional unit


def ​

chartMin ​

Define explicit min value for series axis. See Charts.


meta ​

defchartMin
isnumber
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
numberInteger or floating point numbers annotated with an optional unit


def ​

chartNoScroll ​

Disable scrollbars in viz charts. See Charts.


meta ​

defchartNoScroll
ismarker
liblib:ui

supertypes ​

markerMarker labels a dict with typing information


def ​

chartType ​

Enumerated chart type such as "line" or "bar". See Charts.


meta ​

defchartType
enumSee below
isstr
liblib:ui

enum ​

barvertical bar chart
donutlike pie chart with cutouts in middle of circles
heatMapcolor coded cells
linedraws a line thru y-axis values for series
pievisualize as slices of total
runtimeshows on/off/NA data as horizontal bar chart
scatterdraws dots for series
stackedBarstacks vertical bars from multiple series

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

exclude ​

Marks a series are excluded from the chart. Excluded series are not used when computing the y-axis bounds (unless toggling the series in the legend). See Charts.


meta ​

defexclude
ismarker
liblib:ui

supertypes ​

markerMarker labels a dict with typing information


def ​

format ​

Pattern used to format a value via format(). Use "_blank" to disable showing text in UI screens such as tables.


meta ​

defformat
isstr
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

func:favEdit ​

favEdit(dict) ​

Edit a favotie record. Do not use this function directly; for actions only.


meta ​

admin✓
deffunc:favEdit
disKeyui::edit
isfunc
liblib:ui
multi✓
namefavEdit
select✓

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:favNew ​

favNew(dict) ​

Create a new fav record action. Do not use this function directly; for actions only.


meta ​

deffunc:favNew
disKeyui::new
isfunc
liblib:ui
namefavNew

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:favTrash ​

favTrash(refs) ​

Trash a favorite record. Do not use this function directly; for actions only.


meta ​

admin✓
confirm
deffunc:favTrash
disKeyui::trash
isfunc
liblib:ui
multi✓
namefavTrash
select✓

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:iconUri ​

iconUri(name, style, color) ​

Create a virtual file URI to an icon. If name is null, then default to the "unknown" icon.

iconUri("lock")
iconUri("lock", "outline")
iconUri("lock", "outline", "blue")

meta ​

deffunc:iconUri
isfunc
liblib:ui
nameiconUri

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uiLink ​

Host relative URI to hyperlink to a Fresco view - see Export


meta ​

deffunc:uiLink
isfunc
liblib:ui
nameuiLink

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:uiLinkAbs ​

uiLinkAbs(req) ​

Convenience for httpSiteUri() + uiLink() to generate an absolute URI hyperlink


meta ​

deffunc:uiLinkAbs
isfunc
liblib:ui
nameuiLinkAbs
overridable✓

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:vizAutoRange ​

vizAutoRange(min, max) ​

Return the automatic axis range of a min, max number. The range is returned as a dict of {min, max, interval}.

Examples:

vizAutoRange(22, 99)

meta ​

deffunc:vizAutoRange
isfunc
liblib:ui
namevizAutoRange

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

func:vizInterpolateRgb ​

vizInterpolateRgb(colors, val) ​

Interpolate a heatmap color using the RGB color model. The colors must be a list of color strings or a single string of comma separated colors. The value must be a number between 0.0 to 1.0.

Examples:

vizInterpolateRgb("blue,green,red", 0.5)
vizInterpolateRgb(["#2980b9", "#9b59b6"], 0.5)

meta ​

deffunc:vizInterpolateRgb
isfunc
liblib:ui
namevizInterpolateRgb

supertypes ​

featureFeature namespace of definitions formatted as feature:name
funcAxon function


def ​

noData ​

Message string when no data available. See Charts.


meta ​

defnoData
isstr
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

opacity ​

Alpha transparency for colors as number between 0.0 (transparent) to 1.0 (completely opaque).


meta ​

defopacity
isnumber
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
numberInteger or floating point numbers annotated with an optional unit


def ​

strokeDasharray ​

Comma separated lengths of dashs and gaps for rendering lines such as "6,4". For bar and runtime plots the second digit is used to determine cross hatch spacing (the first digit is ignored).


meta ​

defstrokeDasharray
isstr
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

strokeWidth ​

Stroke width for rendering lines


meta ​

defstrokeWidth
isnumber
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
numberInteger or floating point numbers annotated with an optional unit


def ​

subtitle ​

Defines subtitle string for visualizations. See Charts.


meta ​

defsubtitle
isstr
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

title ​

Defines title string for visualizations. See Charts.


meta ​

deftitle
isstr
liblib:ui

supertypes ​

valData value type
scalarScalar is an atomic value kind
strUnicode string of characters


def ​

uiMeta ​

Singleton used to configure project level user interface settings. See Nav.


meta ​

defuiMeta
ismarker
liblib:ui

supertypes ​

markerMarker labels a dict with typing information


def ​

view:apps ​

App builder used to edit application view groupings


meta ​

admin✓
appNamebuilder
defview:apps
defNameapp
disKeyui::app
iconview
isview
liblib:ui

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:   { inherit:"table" }
search: { input var kind:"Str" defVal:"" }
new:    { action:"recNew" }
edit:   { action:"recEdit" }
trash:  { action:"recTrash" }
menu:   { action:"uiContextMenu" }
data:   { expr:"readAll(app, { sort, search:{{search}} })" }


def ​

view:backups ​

Execute and manage project database backups


meta ​

admin✓
appNametools
defview:backups
disKeyui::backups
iconview
isview
liblib:ui

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:   {inherit:"table"}
backup: {action:"folioBackup"}
delete: {action:"folioBackupDelete"}
data:   {expr:"folioBackups()"}


def ​

view:codeEditor ​

Editor for Axon functions


meta ​

admin✓
appNamecode
defview:codeEditor
defNamefunc
disKeyui::editor
iconview
isview
liblib:ui
order100

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:       { uiType:"uiDev::DevView" }
uri:        { var defVal:`dev:blank` }
showNav:    { var defVal:"funcs" }
showTool:   { var defVal:"hide" }
markers:    { var }


def ​

view:debugExts ​

Debug the installed extensions


meta ​

admin✓
appNamedebug
defview:debugExts
disKeyui::exts
iconview
isview
liblib:ui

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view: {inherit:"table"}
data: {expr:"exts()"}


def ​

view:debugFolio ​

Debug the Folio database and the JIT indexing


meta ​

admin✓
appNamedebug
defview:debugFolio
disKeyui::folio
iconview
isview
liblib:ui

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:    {inherit:"table"}
mode:    {var input kind:"Str" enum:"Summary,Reads by Tag,Reads by Plan,Watches" defVal:"Summary"}
refresh: {dis:"Refresh" noFlash action:"noop"}
details: {dis:"Details" noFlash select action:"folioDebugDetails"}
data:    {expr:"folioDebug({{mode}})"}


def ​

view:debugProj ​

Debug the project actor pools


meta ​

appNamedebug
defview:debugProj
disKeyui::proj
iconview
isview
liblib:ui
su✓

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view: {inherit:"text"}
data: {expr:"debugProj()"}


def ​

view:extSettings ​

Enable and disable project extensions


meta ​

admin✓
appNamesettings
defview:extSettings
disKeyui::exts
iconview
isview
liblib:ui
order100

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:    {inherit:"table"}
enable:  {disKey:"ui::enable"  select multi action:"uiBuilder::LibActions.enable"}
disable: {disKey:"ui::disable" select multi action:"uiBuilder::LibActions.disable"}
data:    {expr: "exts()"}


def ​

view:favs ​

Manage saved favorite views


meta ​

appNamefavs
defview:favs
disKeyui::favorites
iconview
isview
liblib:ui

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view  : { inherit:"tile" }
layout: { var kind:"Str" defVal:"grid 4x1; 0 0 1 1; 1 0 3 1" }
nav: Trio:
  view:     { inherit:"table" }
  filter:   { var defVal:"fav" bindSelect:"filter" }
  sep1:     { action:"uiSep" }
  data:     { expr:"favGroups()" }
table: Trio:
  view:     { inherit:"table" templateName:"fav" }
  filter:   { var binding:"../nav/filter" }
  search:   { input var kind:"Str" defVal:"" }
  edit:     { action:"favEdit" refresh }
  trash:    { action:"favTrash" }
  data:     { expr:"favReadAll({{filter}}, { search:{{search}} })" }


def ​

view:files ​

Browse the virtual file system


meta ​

admin✓
appNametools
defview:files
disFile
disKeyui::file
iconview
isview
liblib:ui

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:    { uiType:"uiBuilder::FileBuilder" }
uri:     { var kind:"Uri" }
newDir:  { disKey:"ui::newDir"  action:"fileBuilderNewDir"  select tag:"uri" }
newFile: { disKey:"ui::newFile" action:"fileBuilderNewFile" select tag:"uri" }
upload:  { disKey:"ui::upload"  action:"fileBuilderUpload"  upload multi     }
rename:  { disKey:"ui::rename"  action:"fileBuilderRename"  select tag:"uri" }
delete:  { disKey:"ui::delete"  action:"ioDelete" select tag:"uri" confirm:{icon:"warn" disKey:"ui::ioDeleteConfirm" detailsKey:"ui::ioDeleteConfirmDetails"} }
data:    { expr:"{}" }


def ​

view:lint ​

View lint errors to validate your database


meta ​

admin✓
appNametools
defview:lint
disKeyui::lint
iconview
isview
liblib:ui

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:   {inherit:"table"}
show:   {var input enum:"All,Warn Only,Err Only" defVal:"All"}
menu:   { action:"uiContextMenu" }
data:   {expr:"lintTool({{show}})"}


def ​

view:projAdmin ​

Admin tools for the current project


meta ​

appNametools
defview:projAdmin
disKeyui::projAdmin
iconview
isview
liblib:ui
su✓

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:        {inherit:"table"}
demogen:     {disKey:"ui::demogen" action:"uiMisc::ProjDemogen.open"}
backup:      {action:"folioBackup"}
restore:     {action:"projRestore" templateName:"projRestore" hideAdd hideAdvanced}
projExport:  {action:"projExport" templateName:"projExport" hideAdd hideAdvanced}
projImport:  {action:"projImport" templateName:"projImport" hideAdd hideAdvanced}
projRebuild: {action:"projRebuildAction"}
data:        {expr:"projViewStatus()"}


def ​

view:projSettings ​

Settings for the project configured on projMeta


meta ​

admin✓
appNamesettings
defview:projSettings
disKeyui::proj
iconview
isview
liblib:ui
templateNameprojSettings

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:   {inherit:"form"}
submit: {action:"recFormCommit" refresh}
data:   {expr: "read(projMeta).recForm(\"projSettings\").addMeta({templateName:\"projSettings\"})"}


def ​

view:shell ​

Axon interactive shell to evaluate and visualize expressions


meta ​

admin✓
appNametools
defview:shell
defNameentity
disKeyui::shell
iconview
isview
liblib:ui
order100

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:   { uiType:"uiBuilder::ShellView" }
tab:    { var kind:"Str" defVal:"" }
expr:   { var kind:"Str" defVal:"{}" }
new:    { action:"recNew" }
edit:   { action:"recEdit" }
dup:    { action:"recDup" }
trash:  { action:"recTrash" }
menu:   { action:"uiContextMenu" }
data:   { expr:"evalOrReadAll({{expr}})" }


def ​

view:sites ​

Site builder used to edit the site/space/equip/point model


meta ​

admin✓
appNamebuilder
defview:sites
disKeyui::site
iconview
isview
liblib:ui
order101

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view: { uiType:"uiBuilder::SiteBuilder" }
menu: { action:"uiContextMenu" }


def ​

view:tags ​

Tag builder used to edit project tag definitions


meta ​

admin✓
appNamebuilder
defview:tags
defNamedef
disKeyui::tag
iconview
isview
liblib:ui

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:   { inherit:"table" }
search: { input var kind:"Str" defVal:"" }
new:    { action:"recNew" }
edit:   { action:"recEdit" }
dup:    { action:"recDup" }
trash:  { action:"recTrash" }
menu:   { action:"uiContextMenu" }
data:   { expr:"recTagDefs({ search:{{search}} })" }


def ​

view:trash ​

View and restore records which have been moved to the trash


meta ​

admin✓
appNametools
defview:trash
disKeyui::trash
iconview
isview
liblib:ui
order801

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:    { inherit:"table" }
empty:   { disKey:"ui::empty"   action:"recEmptyTrash" }
restore: { disKey:"ui::restore" action:"recRestoreFromTrash" select multi }
data:    { expr:"readAll(trash, {trash})" }


def ​

view:uiSettings ​

Settings for the user interfactor configured on uiMeta


meta ​

admin✓
appNamesettings
defview:uiSettings
disKeyui::ui
iconview
isview
liblib:ui
templateNameuiSettings

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:    {inherit:"form"}
submit:  {action:"uiSettingsFormCommit" refresh}
config:  {disMacro:"$<ui::config> $<ui::target>" action:"uiMisc::ConfigTarget.config"}
testNav: {disMacro:"$<ui::test> Nav" action:"uiMisc::NavPathTest.test"}
data:    {expr: "read(uiMeta).recForm(\"uiSettings\").addMeta({templateName:\"uiSettings\"})"}


def ​

view:usingSettings ​

Manage Xeto libraries


meta ​

admin✓
appNamesettings
defview:usingSettings
disKeyui::using
iconview
isview
liblib:ui
order200

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:    {inherit:"table"}
enable:  {disKey:"ui::enable"  select multi action:"uiBuilder::UsingActions.enable"}
disable: {disKey:"ui::disable" select multi action:"uiBuilder::UsingActions.disable"}
data:    {expr: "usingStatus()"}


def ​

view:views ​

View builder used to edit customized views in the local project


meta ​

admin✓
appNamebuilder
defview:views
disKeyui::view
iconview
isview
liblib:ui
templateNameview

supertypes ​

featureFeature namespace of definitions formatted as feature:name
viewFresco UI view

src ​

view:      { uiType:"uiBuilder::ViewBuilder" }
viewRef:   { var input kind:"Ref<view>" }
newView:   { disKey:"ui::new"   action:"uiBuilder::ViewBuilder.onNew" }
editView:  { disKey:"ui::edit"  action:"recEdit" }
saveView:  { disKey:"ui::save"  action:"uiBuilder::ViewBuilder.onSave" select }
trash:     { disKey:"ui::trash" action:"recTrash" refresh }
batchBind: { disKey:"ui::batchBind" action:"uiBuilder::ViewBuilder.onBatchBind" select refresh }
togglesb:  { disKey:"ui::toggleSidebar" action:"uiBuilder::ViewBuilder.onToggleSidebar" }
gotoView:  { disKey:"ui::goto" select action:"uiGoto" target:{view:"{{view}}" } refresh }
data:      { expr:"readAll(view)" }