展示HN:我们为实时仪表板构建了自己的图表类型
大多数分析工具提供10到15种图表类型,然后就结束了。但当这些图表都无法很好地呈现你的数据时,该怎么办呢?
我们在构建CRM仪表板时遇到了这个问题。我们想展示销售代表与未成交交易之间的联系:不仅仅是总数,而是实际的关系。柱状图太平面,表格又太密集。我们需要一个网络图。
问题是,大多数图表库和商业智能工具并不直接支持这种图表。你要么对功能请求说“不”,要么拼凑一个独立的可视化,这样会打破产品的流畅性(没有过滤器、没有交互性、没有主题)。
因此,我们自己构建了这个功能,但以一种仍然与仪表板的其余部分良好配合的方式。Luzmo现在允许你定义自己的图表类型,编写自己的可视化代码,然后像其他图表一样将其放入仪表板编辑器中。Luzmo仍然处理那些繁琐的事情:查询、过滤、主题和图表之间的链接。
最终结果是:
- 销售代表成为网络图中的节点,未成交交易围绕他们旋转。
- 交易规模控制节点大小;胜率控制颜色。
- 一切都能响应过滤器,并且与其他图表自动交互。
教程和GitHub仓库详细介绍了整个过程:设置构建器、定义数据插槽、编写渲染方法,并将所有内容打包以供部署。
我很想听听其他解决类似问题的人的看法:
- 你是否曾经需要一个你的商业智能工具不支持的图表类型?
- 你是自己构建的,还是找到了解决方法?
- 原生交互性与嵌入独立可视化相比,哪个更重要?
阅读完整文章并查看完整代码: [https://www.luzmo.com/blog/build-custom-charts](https://www.luzmo.com/blog/build-custom-charts)
查看原文
Most analytics tools give you 10–15 chart types and call it a day. But what happens when none of them actually represent your data well?<p>We ran into this when building a CRM dashboard. We wanted to show how sales reps connect to open deals: not just totals, but actual relationships. A bar chart was too flat, a table too dense. We needed a network graph.<p>The problem? Most chart libraries and BI tools don’t support that out of the box. You either say “no” to the feature request, or you hack together a standalone visualization that breaks the product’s flow (no filters, no interactivity, no theming).<p>So we built it ourselves, but in a way that still plays nicely with the rest of the dashboard. Luzmo now lets you define your own chart type, write your own visualization code, and then drop it into the dashboard editor like any other chart. Luzmo still handles the boring stuff: querying, filtering, theming, and cross-chart linking.<p>The end result:
- Sales reps become nodes in a network graph, with open deals orbiting around them.
- Deal size controls node size; win probability controls color.
- Everything responds to filters and interacts with other charts out of the box.<p>The tutorial and GitHub repo walk through the whole process: setting up the builder, defining data slots, writing render methods, and packaging it all up for deployment.<p>I’d love to hear from others who’ve solved similar problems:
- Have you ever needed a chart type your BI tool didn’t support?
- Did you build it yourself, or find a workaround?
- How important is native interactivity vs. just embedding a standalone visualization?<p>Read the post + see the full code: <a href="https://www.luzmo.com/blog/build-custom-charts" rel="nofollow">https://www.luzmo.com/blog/build-custom-charts</a>