简体   繁体   English

将FSLab XPlot图形部署到Web

[英]Deploy FSLab XPlot Graphics to Web

I'm interested in deploying interactive graphics built with FSLabs XPlot wrappers around plot.ly and google charts to wordpress, xamarin and good old web platforms. 我有兴趣将使用FSLabs XPlot包装的交互式图形在plot.ly和google图表周围部署到wordpress,xamarin和良好的旧网络平台。 I have scoured the documentation, which does a fantastic job of demoing the charting capabilities, but not so much how to integrate into a wordpress site, a xamarin app or an angular application with an F# Web Api back end. 我已经仔细检查了文档,它可以很好地演示图表功能,但不是很多如何将其集成到wordpress网站,xamarin应用程序或带有F#Web Api后端的角度应用程序。

Docs on this or pointesr would be be beyond helpful! 关于这个或指针的文档将是无用的!

Thanks, 谢谢,

As nobody has found an answer and I have found the answer since posting, I have decided to post it here as a legit answer which solved my problem. 由于没有人找到答案而且我自发布以来找到了答案,我决定将其作为一个合法的答案在这里发布,这解决了我的问题。

Step 1: 步骤1:

Create a class library for your charts in the foreign F# language, because most web dev's use C# 使用外部F#语言为您的图表创建一个类库,因为大多数Web开发人员都使用C#

在此输入图像描述 Step 2: 第2步:

Create a sweet chart: 创建一个甜蜜的图表:

在此输入图像描述 Step 3: 第3步:

Reference and Serve sweet chart from C#: 来自C#的参考和服务甜蜜图表:

  1. Note you put all of the policy control into the hands of the web dev with no additional components. 请注意,您将所有策略控制权交给Web开发人员,而无需其他组件。

  2. Want google/twitter auth? 想要google / twitter认证吗? Get it! 得到它! Want routing controls, you have it all right here, no additional stuff, no additional staffing needed. 想要路由控制,你可以在这里拥有它,没有额外的东西,不需要额外的人员。

  3. No additional admins needed. 无需其他管理员。

在此输入图像描述 Step 4: 第4步:

Bind Chart to web application… 将图表绑定到Web应用程序......

在此输入图像描述 Note that you need to make a call to drawChart(); 请注意,您需要调用drawChart(); to ensure the chart draws, otherwise you have a race condition. 确保图表绘制,否则您有竞争条件。 That line of code is not pictured, but important. 这段代码没有图示,但很重要。

Step 5: 第5步:

Enjoy your charts 享受你的图表

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM