1.0.0 • Published 3 years ago

react-ldavis v1.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

react-ldavis

React Component for LDAvis

NPM JavaScript Style Guide

Install

npm install react-ldavis

Usage

import React, { Component } from 'react'

import LDAvis from 'react-ldavis'
import 'react-ldavis/dist/index.css'

class Example extends Component {
  render() {
    return <LDAvis
      data={{...}}
      modifyHistory={false}
      style={{ textAlign: "center" }}
    />
  }
}

API

NameTypeDefaultDescription
dataobjectundefinedVisualization object
modifyHistorybooleanfalseNormally, legacy LDAvis script changes url when you interact with visualization plot. (e.g. when you click on a topic #topic=2&lambda=1&term= appears at the end of the url) When this prop is true, plotting only one plot may not be a problem, but using multiple instances of LDAvis can cause inconsistency.
style(style) objectundefinedStyling for <div> container.

License

MIT © thesseyren