Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

victory

Package Overview
Dependencies
Maintainers
3
Versions
265
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory

Data viz for React

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is victory?

Victory is a collection of composable React components for building interactive data visualizations. It provides a wide range of chart types and is designed to be highly customizable and easy to use.

What are victory's main functionalities?

Line Chart

Victory allows you to create line charts easily. The code sample demonstrates how to create a simple line chart using VictoryLine and VictoryChart components.

const data = [
  { x: 1, y: 2 },
  { x: 2, y: 3 },
  { x: 3, y: 5 },
  { x: 4, y: 4 },
  { x: 5, y: 7 }
];

<VictoryChart>
  <VictoryLine data={data} />
</VictoryChart>

Bar Chart

Victory makes it simple to create bar charts. The code sample shows how to create a bar chart using VictoryBar and VictoryChart components.

const data = [
  { x: 'A', y: 2 },
  { x: 'B', y: 3 },
  { x: 'C', y: 5 },
  { x: 'D', y: 4 },
  { x: 'E', y: 7 }
];

<VictoryChart>
  <VictoryBar data={data} />
</VictoryChart>

Pie Chart

VictoryPie component allows you to create pie charts. The code sample demonstrates how to create a pie chart with different categories.

const data = [
  { x: 'Cats', y: 35 },
  { x: 'Dogs', y: 40 },
  { x: 'Birds', y: 25 }
];

<VictoryPie data={data} />

Scatter Plot

VictoryScatter component is used to create scatter plots. The code sample shows how to create a scatter plot using VictoryScatter and VictoryChart components.

const data = [
  { x: 1, y: 2 },
  { x: 2, y: 3 },
  { x: 3, y: 5 },
  { x: 4, y: 4 },
  { x: 5, y: 7 }
];

<VictoryChart>
  <VictoryScatter data={data} />
</VictoryChart>

Other packages similar to victory

FAQs

Package last updated on 18 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc