Scala's interactive charting tool wisp

Source: Internet
Author: User
Tags datetime iterable

Project Address: Https://github.com/quantifind/wisp

Wisp is a real-time, interactive charting tool.

Install SBT, then download the WISP project locally, then CD to the WISP project root directory, such as mine (CD D:\spark\wisp), then execute the SBT "project Wisp" console, which will enter the SBT console after the compilation is successful.

Then you can start writing the code:

First, the first step is to import: Import com.quantifind.charts.highcharts._

You can then draw different charts as needed, such as drawing a line chart: lines (Seq (1,3,2,4,6))

Enter Help to view assistance, all supported charts, and more:

Scala> Help () serving resources from:file:/users/austin/ideaprojects/wisp/index-1418919953763.html 2014-12-18 08:25:53.984:info:oejs. server:jetty-7.6.0.v20120127 2014-12-18 08:25:54.022:info:oejsh. Contexthandler:started o.e.j.s.servletcontexthandler{/,file:/users/austin/ideaprojects/wisp/ index-1418919953763.html} 2014-12-18 08:25:54.035:info:oejs. abstractconnector:started socketconnector@0.0.0.0:61395 Server started:http://192.168.1.251:61395/ index-1418919953763.html Available Plot Types:takes an iterable, an iterable of pairs, a pair of iterables, or an Iterab Le and a Function area areaspline bar column line pie scatter spline regression othe                            R plotting Options:histogram iterable of Numerics or Pairs BoxPlot                               Collections of five numerics:low, Q1, median, Q3, high stylistic changes:hold Plots the next plot on top of the existing plot unhold                             Plots the next plot in a new chart title (String) add a title to the                        Most recent plot xaxis (String) adds a label to the x-axis Xaxistype ([ Updates the x-axis type "linear", "Logarithmic", "datetime", "category"]) Xaxiscategories (iterable[st                        Ring]) Create named labels for X-axis YAxis (String) adds a label to Y-axis Yaxistype ([ Updates the y-axis type "linear", "Logarithmic", "datetime", "category"]) yaxiscate Gories (iterable[string]) create named labels for Y-axis legend (Iterable[string]) adds a legend to the most Recent plot stack (["Normal", "percent"]) stacks bars, columns, and lines relative to each other Server Controls : Undo undoes the most recent action redo the Opposit    E of undo Delete                         Wipes the most recent chart from the page DeleteAll wipes all plots From the page
When you draw the wrong diagram, you can perform the Undo,redo that is the reverse operation of undo.

In addition to drawing the chart, you can change the appearance of the chart, such as Xaxis ("label on X-axis") to change the default display lable of the x-axis. Or title ("title of the chart") to change the title of the chart, which is for the most recent chart (most recent Plot) operation, the hold command allows holding a chart that can be appended to the chart later, for example, I want to draw two polylines on a chart, and I can execute the following commands sequentially:

Line (1,2,3,4,5)

Hold

Line (5,4,3,2,1)

If not, the second line will be displayed on another latest chart.

Execution Unhold cancels the hold of the chart so that the newly executed command will draw a new chart.

For more details, refer to the official documentation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.