我正在尝试为 Python 复制它,但找不到任何答案:
是否可以在 Power BI 的 R Script Visual 中使用 R Plotly 库?
或者 :
https://radacad.com/interactive-map-using-r-and-power-bi-create-custom-visual-part-1
更具体一点:如何更改提供的解决方案以使用 script.py 而不是 script.R
非常感谢任何帮助。
我发现在这个文件夹中有一个名为 capabilities.json 的文件,所以我认为这是解决方案的一部分:
"script": {
"scriptProviderDefault": "R", ###I guess this needs to be changed to Py
"scriptOutputType": "html",
"source": {
"objectName": "rcv_script",# not sure about this
"propertyName": "source"
},
"provider": {
"objectName": "rcv_script",# not sure about this
"propertyName": "provider"
}
}
而且在这个项目中删除了引用dependecies.json之后,在构建并将它导入到Power BI之后,我得到了这个错误
Error Message:
An exception of type System.ArgumentException occured.
Stack Trace:
System.ArgumentException: The supplied rendering engine is not supported
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.TransformDat aShapeResult(QueryCommand transformCommand, SemanticQueryDataShapeCommand command, Stream dataShapeResultStream, QueryBindingDescriptor& bindingDescriptor)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ExecuteDataQuery(IQueryResultDataWriter queryResultDataWriter, EngineDataModel engineDataModel, DataQuery query, Int32 queryId, ServiceErrorStatusCode& serviceErrorStatusCode, CancellationToken cancelToken)
at Microsoft.PowerBI.ExploreHost.SemanticQuery.ExecuteSemanticQueryFlow.ProcessAndWriteSemanticQueryCommands(IQueryResultsWriter queryResultsWriter, IList`1 queries, HashSet`1 pendingQueriesToCancel, EngineDataModel engineDataModel)