GithubHelp home page GithubHelp logo

oblongmana / flot-tickrotor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from markrcote/flot-tickrotor

0.0 2.0 0.0 189 KB

Flot plugin to display angled X-axis tick labels.

JavaScript 100.00%

flot-tickrotor's Introduction

Flot plugin to display angled X-axis tick labels.
https://github.com/markrcote/flot-tickrotor

Requires flot 0.7 or higher and a browser supporting <canvas>.

To activate, just set xaxis.rotateTicks to an angle in degrees.  Labels are
rotated clockwise, so if you want the labels to angle up and to the right
(/) you need to provide an angle > 90.  The text will be flipped so that it
is still right-side-up.

Angles greater than or equal to 180 are ignored.

If set, xaxis.rotateTicksFont is used for the ticks font.  Otherwise, the
CSS font property for the tickLabel class is used.  If neither is set, the
default is 'smaller sans-serif'.

The graph is resized so that all labels can be displayed properly.
- NOTE: currently this only works with label angle > 90 degrees.

If you are using this with flot-axislabels, include flot-tickrotor *before*
flot-axislabels, since the former completely redefines the X-axis
labelHeight, and the latter only modifies it.

TODO
----

- Fix plot resizing with long labels when angle < 90 degrees.  It seems to
  require a y2axis at the moment and fails if one isn't defined.

flot-tickrotor's People

Contributors

vojtechh avatar

Watchers

 avatar  avatar

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.