GithubHelp home page GithubHelp logo

lugolabs / circles Goto Github PK

View Code? Open in Web Editor NEW
1.1K 1.1K 249.0 84 KB

A lightweight JavaScript library that generates circular graphs in SVG.

Home Page: https://www.lugolabs.com/circles

License: Other

JavaScript 71.22% HTML 28.78%

circles's People

Contributors

adrien-gueret avatar brunocartier avatar jodiwarren avatar luclanet avatar mauron85 avatar petsoukos avatar rsalo avatar rtsinani avatar webal 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

circles's Issues

Display only the text

Hello,

I can't show only the text.

I don't want the circle and I don't want to use the default style for the text. I put false for these parameters :
styleWrapper,
styleText:
But the default style is still be used for the text.

How can I show only the text without the default style?

Dont animate until visible?

Is there a way to get it not to animate until it is visible on the page?

I have the element a ways down my page but it animates right away not when the user gets to it.

negative values

is there a way that the circles also display negative values and they would still fill up

Documentation needs to be more clear

I am looking to make circles work within my React.js app as my UX Designer has used in in her code. I am familiar with Highcharts and am assuming since you explain Circles is based on that approach, I can incorporate it into React the same way. But I do have some feedback on your documentation:

  • It says you can install via npm but does not link to the npm package page or give the exact name of the package to install:

From the Documentation:

Install with grunt
Get the library
Install all the dependencies, run npm install
Once you have the dependencies installed, run grunt from the project directory. This will run the default grunt task which will minify circles.js to circles.min.js

I couldn't find a reference to it in the PR records either, though there is a trail of when it was added back in 2015

  • There is no example of how to use Circles with React/Angular/Vue/etc and I think that is unfortunate as most web developers are now progressing in these libraries/frameworks

In the chances this 'issue' gets a response soon, I would appreciate someone sharing the exact npm package to use and if anyone has used Circles in a React app please share your approach as well.

Thanks!

Is there a way to make larger text size smaller to fit into the circle?

image

Is there a way to make larger text size smaller to fit into the circle?

I have multiple circles and need to keep circle size the same. But some of the circles have large number and it will overflow (see picture). Would like to find out is there a way to auto adjust the text to fit into the circle or something that need to be done manually.

Thanks for your help.

Display text when value is zero

How can I show the value is zero. Every time I set reset back to zero the text value becomes transparent or not displayed at I can't really tell which. Thanks

image

Remove the Decimals

Everything works great so far , i just can't figure out how to remove the decimals that will be displayed when the Value counts up..thanks a lot 👍

minified js

Hi,

Can you add the minified js file ?

thanks

Is there a way to make second color gradient ?

Hi,

Is there a way to make second color linear-gradient in options, like this ?

Circles.create({
  id : "circle",
  radius : 45,
  value : 60,
  maxValue : 100,
  width : 7,
  text : 5,
  colors : ["#f1f1f1", "linear-gradient(#e66465, #9198e5)"],
  duration : 400,
  wrpClass : 'circles-wrp',
  textClasss : 'circles-text',
  styleWrapper : true,
  styleText : true
});

And give something similar to this (not necessary the same colors and shape) :
img

Update values

Is there a way to update values?

I'm trying that when the user performs certain action, i.e. press a button, the circle updates with a bigger percentage value.

Can I do that?

Thank you.

Bower package

I would be very happy, if a bower package would be available

Display on hover or popup

Hi,

Is there a way to display more data by mouse hover on circle or create a popup when click on the circle?

Add Text Before Number

I love the project, but would like to be able to show both positive and negative percentages. It would be really nice if a plus sign (+) or a minus sign (-) could be added to the number in the center. (+75.25%) or (-75.25%) That way I can show percentage of increase or decrease.

Thanks!

Shape on the end of the stroke

Hi,

This is more of a feature request, just want to know if it's possible to add a shape in front of the stroke. In my case I need to add a dot/circular shape to it e.g.
circle
. I could see a case of someone needing an arrow on the end maybe.

Duration in Firefox

Thank you for plugin but I found some bug in FF.
When I set:

duration: 1500

animation takes around 3 seconds. Also when I change duration to 5000 nothing changes...
Do you know where can be problem? Other browsers are fine...

Stopping the animation

Hey,
Pretty nice plugin, I am currently facing only one issue.
Can you please tell me how to stop animation by calling a javascript function. I was using it for file upload function where the upload percent value I get through ajax but the speed of getting values is so high the sometime last update command overwrites the new one.

Feature request - background & font color

Wouldn't it be convenient if we can change the background color of the inner circle? Now it is transparent, which is great because in most cases the background of a webpage will be white-ish. But for those times when using it in a dark theme for example, I think it would be a nice extra if you could parameterise the background and font color. I'd be happy to take a look at it if you're interested. Unless this feature already exists and I dumbly overlooked it?

values defined in html

Hello,

Can i have the percentage and number (and other values for that matter) defined in html ?

Take the example below:

<div class="circle" id="circles-1" data-percentage="10" data-number="10"></div>

Thanks

Counter Clockwise Animation?

Is there a data-attribute for making the animation work counter-clockwise as apposed to clockwise?

Thanks,
-B.

add git tags for later versions

hi, I'm from cdnjs. Recently we want to add your lib to https://cdnjs.com, could you please consider adding git tags for v0.0.6 and each released version in the future because we use git auto-update to add each released version to cdnjs automatically, it can help us maintain your lib the latest version to your lib users.
thank you very much!

cdnjs/cdnjs#9024

Passing values as data attributes

Great plugin. More of an enhancement but would it possible to pass values as data attributes on the div instead of in the js?

<div class="circle" id="circles-1" data-value="10"></div>

different size for values

It's posible to asign different size to the value stroke to create something like the attached image?
Im know nothing of svg but if you say its possible i will start playing with the javascript until i get something similar
captura de pantalla 2014-07-03 a la s 17 00 34

Event handlers

Are there any event handlers?

For example I need to change colors on every value updating. Is it possible now?

Make it responsive?

Hi,

Love this project. However, is there someway to make the circles responsive? As in, adjust the radius of the circles to adapt to the size of their containers so that when the browser re-sizes the circles do not overflow the containers.

Thanks.

Can't override font-size of the text

I am trying to override the font size of the text inside the circle by passing in a class name for textClass property in the constructor. But it seems the default font size gets priority

Start at a different spot

Do you have a suggestion on how to make the start be the 06:00 position (bottom of circle) and then rotate clockwise from there?

Add ViewBox Svg

Please, add viewbox svg for image svg can responsive all screen

UMD wrapper

Add UMD Wrapper, so Circles can be used directly from npm.

Slow animation

I don't see any difference when I set duration 1 or 1000.
Is there a way to make animation faster?

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.