spotfire中文使用教程含演示数据以及二次开发思路整理

文档下载地址:
https://download.csdn.net/download/weixin_41607523/85214206?spm=1001.2014.3001.5503
在这里插入图片描述

基于Echarts图表的开发思路:

在这里插入图片描述
通过html语言、javascript语言做出一个基于需求所开发组件的静态图表(此处指手动填充数据,如下所示:)
在这里插入图片描述
最终生成一个我们所需要的组件基础模板,如下所示:
在这里插入图片描述
在此基础上我们要将以上代码嵌入到spotfire当中,如下所示:
在这里插入图片描述
在spotfire中需要做到以下几点:
1、 坐标轴的解决
2、 坐标轴刻度大小随数据大小改变
3、 数据分别规律的填充左右两个坐标轴
4、 设置参数,数据改为spotfire数据表中数据
5、 数据的逻辑判断
6、 数据接口的对接

spotfire代码呈现脚本处理难点:

Python语言框架:

在这里插入图片描述

Javascript语言框架:

在这里插入图片描述

html语言框架:

在这里插入图片描述

其它开发语言综合应用:

在这里插入图片描述

使用Spotfire API重新加载数据可以通过以下步骤完成: 1. 首先,需要连接到Spotfire服务器。这可以通过使用API提供的TSServerConnection类来实现。例如: ```python from Spotfire.Dxp.Data import DataManager, DataColumnSignature from Spotfire.Dxp.Data.Import import TextFileDataSource from Spotfire.Dxp.Application import Application from Spotfire.Dxp.Framework.ApplicationModel import ApplicationThread from Spotfire.Dxp.Framework.Library import LibraryManager from Spotfire.Dxp.Framework.ApplicationModel import ApplicationThread from Spotfire.Dxp.Framework.DocumentModel import DocumentManager from Spotfire.Dxp.Data.Import import DataSourcePromptMode from Spotfire.Dxp.Data import DataFlowBuilder from Spotfire.Dxp.Data.Import import TextFileDataSourceSettings from Spotfire.Dxp.Data.Import import DataSourceTypeIdentifiers from Spotfire.Dxp.Data import RowSelection server = Application.GetServerConnection() ``` 2. 然后,需要打开要重新加载数据的文档。这可以通过使用API提供的DocumentManager和LibraryManager类来实现。例如: ```python libraryManager = LibraryManager(server) documentManager = DocumentManager(server) document = documentManager.OpenDocument("path/to/document") ``` 3. 然后,需要获取要重新加载数据数据表。这可以通过使用API提供的DataManager类来实现。例如: ```python dataManager = document.Data table = dataManager.Tables["table_name"] ``` 4. 然后,需要创建一个新的数据源,以便重新加载数据。这可以通过使用API提供的DataFlowBuilder和TextFileDataSourceSettings类来实现。例如: ```python dataSource = TextFileDataSourceSettings() dataSource.ColumnNamesLineIndex = 0 dataSource.DataStartingLineIndex = 1 dataSource.FieldSeparator = '\t' dataSource.HasHeaderRecord = True dataSource.IncludeFileShareCredentials = False dataSource.LocalFilePath = "path/to/file" dataFlowBuilder = DataFlowBuilder() dataFlowBuilder.AddImportDataSource("dataSourceName", DataSourceTypeIdentifiers.TextFile, dataSource) dataFlow = dataFlowBuilder.Build() newDataSource = dataFlow.DataSourceInfos["dataSourceName"].DataSource ``` 5. 最后,需要使用新的数据源重新加载数据。这可以通过使用API提供的DataManager和TextFileDataSource类来实现。例如: ```python textFileDataSource = TextFileDataSource(newDataSource, dataManager) textFileDataSource.ReplaceData(table, DataSourcePromptMode.Never) ``` 完成这些步骤后,数据表应该已经重新加载了新的数据
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

DBA狗剩儿

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值