Rev 20 | Blame | Compare with Previous | Last modification | View Log | Download
## Contributing to Flot ##We welcome all contributions, but following these guidelines results in lesswork for us, and a faster and better response.### Issues ###Issues are not a way to ask general questions about Flot. If you see unexpectedbehavior but are not 100% certain that it is a bug, please try posting to the[forum](http://groups.google.com/group/flot-graphs) first, and confirm thatwhat you see is really a Flot problem before creating a new issue for it.When reporting a bug, please include a working demonstration of the problem, ifpossible, or at least a clear description of the options you're using and theenvironment (browser and version, jQuery version, other libraries) that you'rerunning under.If you have suggestions for new features, or changes to existing ones, we'dlove to hear them! Please submit each suggestion as a separate new issue.If you would like to work on an existing issue, please make sure it is notalready assigned to someone else. If an issue is assigned to someone, thatperson has already started working on it. So, pick unassigned issues to preventduplicated efforts.### Pull Requests ###To make merging as easy as possible, please keep these rules in mind:1. Divide larger changes into a series of small, logical commits withdescriptive messages.2. Format your code according to the style guidelines below.3. Submit new features or architectural changes to the <version>-work branchfor the next major release. Submit bug fixes to the master branch.4. Rebase, if necessary, before submitting your pull request, to reduce thework we need to do to merge it.### Flot Style Guidelines ###Flot follows the [jQuery Core Style Guidelines](http://docs.jquery.com/JQuery_Core_Style_Guidelines),with the following updates and exceptions:#### Spacing ####Do not add horizontal space around parameter lists, loop definitions, orarray/object indices. For example:```jsfor ( var i = 0; i < data.length; i++ ) { // This block is wrong!if ( data[ i ] > 1 ) {data[ i ] = 2;}}for (var i = 0; i < data.length; i++) { // This block is correct!if (data[i] > 1) {data[i] = 2;}}```#### Comments ####Use // for all comments except the header at the top of a file or inlineinclude.All // comment blocks should have an empty line above *and* below them. Forexample:```jsvar a = 5;// We're going to loop here// TODO: Make this loop faster, better, stronger!for (var x = 0; x < 10; x++) {}```#### Wrapping ####Block comments should be wrapped at 80 characters.Code should attempt to wrap at 80 characters, but may run longer if wrappingwould hurt readability more than having to scroll horizontally. This is ajudgement call made on a situational basis.Statements containing complex logic should not be wrapped arbitrarily if theydo not exceed 80 characters. For example:```jsif (a == 1 && // This block is wrong!b == 2 &&c == 3) {}if (a == 1 && b == 2 && c == 3) {} // This block is correct!```