Giter Club home page Giter Club logo

fynesimplechart's Introduction

fyne-simple-chart

A simple chart implementation that an be used in fyne applications.

Warning

As of now, negative values are not yet implemented. Can be used in plotting to the first quadrant of the cartessian plane.

Features

  • Scatter Plot
  • Bar Chart
  • Pie Chart
  • Column Chart

Installation

go get github.com/alexiusacademia/fynesimplechart

Usage

package main

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"github.com/alexiusacademia/fynesimplechart"
)

func main() {
	a := app.New()
	w := a.NewWindow("Hello")

	nodes := []fynesimplechart.Node{
		*fynesimplechart.NewNode(1, 1),
		*fynesimplechart.NewNode(1, 3),
		*fynesimplechart.NewNode(4, 0),
		*fynesimplechart.NewNode(5, 2),
	}

	plot := fynesimplechart.NewPlot(nodes, "Plot 1")
	plot.ShowLine = true

	nodes2 := []fynesimplechart.Node{
		*fynesimplechart.NewNode(1.5, 5),
		*fynesimplechart.NewNode(5, 4),
		*fynesimplechart.NewNode(8, 7),
		*fynesimplechart.NewNode(10, 2),
	}
	plot2 := fynesimplechart.NewPlot(nodes2, "Plot 2")
	plot2.ShowLine = true

	scatter := fynesimplechart.NewGraphWidget([]fynesimplechart.Plot{*plot, *plot2})
	scatter.Resize(fyne.NewSize(400, 300))

	w.SetContent(scatter)
	w.ShowAndRun()
}
  1. First Graph
Screenshot 2024-04-13 at 12 06 17 PM
  1. Second Graph for version v0.1.1
Screenshot 2024-04-13 at 1 33 47 PM
  1. Graph preview for version v0.1.2
Screenshot 2024-04-13 at 1 57 41 PM

fynesimplechart's People

Contributors

alexiusacademia avatar

Stargazers

Christian Q. Cleofas avatar Vanes Angelo avatar

Watchers

 avatar

fynesimplechart's Issues

Handle Negative Nodes

As of now, plots can only be done correctly in the first quadrant (positive x and y).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.