/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import $ from "jquery"; import React from "react"; import style from "./style.scss"; //@ts-ignore import LogoSVG from "../../hiplot/static/logo.svg"; interface TutorialStepProps { rootRef: React.RefObject; }; class StepHiPlotInfo extends React.Component { render() { // @ts-ignore let pkgInfo = HIPLOT_PACKAGE_NAME_FULL; if (pkgInfo === undefined) { pkgInfo = "hiplot (no version information)"; } return (

Welcome to HiPlot "getting started" tutorial

Click the button "Next" to start

{pkgInfo}

Learn more:


Did you know that HiPlot can be used:

) } } class StepParallelPlot extends React.Component { componentDidMount() { $(this.props.rootRef.current.parentElement).find('.pplot-root').addClass(style.highlightElement); } componentWillUnmount() { $(this.props.rootRef.current.parentElement).find('.pplot-root').removeClass(style.highlightElement); } render() { return (

Step 1/4: The parallel plot

The first plot you see above is a Parallel Plot. Parallel plots are a convenient way to visualize and filter high-dimensional data. HiPlot will draw one vertical scaled axis for each metric you have in your dataset, and each training/data point is a continuous line that goes through its value on each of the axes.


Learn more about Parallel coordinates on Wikipedia.

) } } class StepLearnToSlice extends React.Component { componentDidMount() { $(this.props.rootRef.current.parentElement).find('.pplot-brush').addClass(style.highlightElement); } componentWillUnmount() { $(this.props.rootRef.current.parentElement).find('.pplot-brush').removeClass(style.highlightElement); } render() { return (

Step 2/4: Slicing data

Slicing along an axis allows to discover patterns in the data. Drag vertically along an axis to display only a subset of the data. You also can do it on several axis at the same time.


To remove a slicing on an axis, click on the axis.

) } } class StepMoveAndRemoveColumns extends React.Component { componentDidMount() { $(this.props.rootRef.current.parentElement).find('.pplot-label').addClass(style.highlightText); } componentWillUnmount() { $(this.props.rootRef.current.parentElement).find('.pplot-label').removeClass(style.highlightText); } render() { return (

Step 3/4: Move and remove axis

Move an axis by dragging its label above. In parallel plots, we can very easily spot relationships between nearby axis. You can also remove an axis by moving it all the way to the left or to the right.

) } } class StepDataTypeAndScaling extends React.Component { componentDidMount() { $(this.props.rootRef.current.parentElement).find('.pplot-label').addClass(style.highlightText); } componentWillUnmount() { $(this.props.rootRef.current.parentElement).find('.pplot-label').removeClass(style.highlightText); } render() { return (

Step 4/4: Data type and scaling

Right click on an axis to see options. You can chose how to color your datapoints, change the scaling and more!


In this same menu, you can enable an XY plot by selecting an X and Y axis.

) } } interface Props { onTutorialDone: () => void; navbarRoot: React.RefObject; }; interface State { stepNum: number; }; export class HiPlotTutorial extends React.Component { steps = [ (p: TutorialStepProps) => , (p: TutorialStepProps) => , (p: TutorialStepProps) => , (p: TutorialStepProps) => , (p: TutorialStepProps) => , ]; constructor(props: Props) { super(props); this.state = { stepNum: 0 }; } onClickNextTutorial() { if (this.state.stepNum == this.steps.length - 1) { this.props.onTutorialDone(); return; } this.setState(function(prevState, prevProps) { return { stepNum: Math.min(prevState.stepNum + 1, this.steps.length - 1) }; }); } onClickPreviousTutorial() { if (this.state.stepNum == 0) { this.props.onTutorialDone(); return; } this.setState(function(prevState, prevProps) { return { stepNum: Math.max(prevState.stepNum - 1, 0) }; }); } render() { return (
{this.steps[this.state.stepNum]({ rootRef: this.props.navbarRoot })}
) } }