Giter Club home page Giter Club logo

caroline's Introduction

CI

alt text
Logo Created By @stsdc
A simple Cairo Chart Library for GTK and Vala

Caroline is a simple and light interface into Cairo allowing a developer to create a chart in just a few lines of code! Below is some screenshots of what you can do with it currently. Also below is a road map, documentation, and some ramblings about the development process and inner-workings of Cairo and Caroline!

Getting Started

Compiling & Installing

mkdir build
cd build
meson ..
ninja
sudo ninja install

You now have a linked library that can be accessed by your app!

Simple Usage

A sample application called "Sample.vala" is included in this repo, it contains a simple application to show off how Caroline works. Below is a bare-bones example of how to interface with Caroline.

var carolineWidget = new Caroline.without_colors (
  x, //dataX
  yArray, //dataY
  chartTypes, //chart types
  true, //yes or no for generateColors function (needed in the case of the pie chart),
  true, //true for generating hue based colors, and false for random colors
  false // yes or no for scatter plot labels
);

or generate your own colors:

ArrayList<Caroline.ChartColor?> chartColorArray = new ArrayList<Caroline.ChartColor?> ();

for (int i = 0; i < cArray.length; i++){

  //Create color struct
  Caroline.ChartColor chartColor = {
    Random.double_range(0,1),
    Random.double_range(0,1),
    Random.double_range(0,1)
  };

  chartColorArray.insert (i, chartColor);

}

var carolineWidget = new Caroline.with_colors (
  x, //dataX
  yArray, //dataY
  chartColorArray,
  false, //yes or no for generateColors function (needed in the case of the pie chart),
  false, //true for generating hue based colors, and false for random colors
  false // yes or no for scatter plot labels
);

This is how we generate a simple line chart. See the full sample application to learn more.

Caroline Documentation

Check out the code! It has lots of detailed documentation and try using the Sample.vala file. Chart types are now bar, line, smooth-line, scatter, and pie.

caroline's People

Contributors

dcharles525 avatar grindhold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

caroline's Issues

Add method to update data

Hello,

first off - thanks for this library, it's really nice to use ๐Ÿ‘

It'd be great if Caroline had support for reloading dataX and dataY with different values - possibly with a short animation.

Any plans for a gtk4 update?

I noticed that there have been no update for a while, so I was wondering if the project was still actively being updated, or how you felt about a gtk4 port.

I have been moving some of my gtk3 apps in an another language to gtk4 and Vala. This has been successful, but it leaves me with missing support for plots. Caroline seems to fit my needs, and I have started looking at porting it myself. If I do so, I would like to coordinate with anyone else who is interested, and produce a pull request if this is of interest here.

foss license

i kind of like the project and would like to contribute more but this project does not yet have a license attached. i want to make sure that code i write in my spare time will guarantee users the four freedoms. i myself use the Lesser General Public License 3 to achieve this. MIT / BSD licenses work as well. Could you please announce a license for the Project?

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.