Spark - Highcharts // 动态添加点
Spark - Highcharts // Add points dynamically
我想在 spark - highcharts 中动态添加点,精确使用 Zeppelin。
我正在使用:
https://github.com/knockdata/spark-highcharts
有人知道创建图表后如何处理吗?
示例:
import com.knockdata.spark.highcharts._
import com.knockdata.spark.highcharts.model._
var myChart = highcharts(
bank
.seriesCol("cluster")
.series("x" -> "x", "y" -> "y"))
.subtitle(Subtitle("Example"))
.title(new Title("EXAMPLE"))
.xAxis(XAxis("X"))
.yAxis(YAxis("Y"))
.chart(Chart.scatter)
myChart.plot()
对于普通DataFrame,图表数据是在调用highcharts
函数时创建的。数据系列是根据您在 highcharts
函数中放置的定义从 DataFrame 创建的。它不能手动添加数据点。
虽然您可以使用以下选项使图表更适合您的需要。
- Add bands to xAxis or yAxis
- 向 xAxis 或 yAxis 添加线。它与 plotBands
非常相似
- Add data labels
- Add tooltips
我想在 spark - highcharts 中动态添加点,精确使用 Zeppelin。
我正在使用:
https://github.com/knockdata/spark-highcharts
有人知道创建图表后如何处理吗?
示例:
import com.knockdata.spark.highcharts._
import com.knockdata.spark.highcharts.model._
var myChart = highcharts(
bank
.seriesCol("cluster")
.series("x" -> "x", "y" -> "y"))
.subtitle(Subtitle("Example"))
.title(new Title("EXAMPLE"))
.xAxis(XAxis("X"))
.yAxis(YAxis("Y"))
.chart(Chart.scatter)
myChart.plot()
对于普通DataFrame,图表数据是在调用highcharts
函数时创建的。数据系列是根据您在 highcharts
函数中放置的定义从 DataFrame 创建的。它不能手动添加数据点。
虽然您可以使用以下选项使图表更适合您的需要。
- Add bands to xAxis or yAxis
- 向 xAxis 或 yAxis 添加线。它与 plotBands 非常相似
- Add data labels
- Add tooltips