Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all dc.mixin docs #999

Merged
merged 3 commits into from
Sep 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module.exports = function (grunt) {
watch: {
jsdoc2md: {
files: ['<%= conf.src %>/**/*.js'],
tasks: ['jsdoc2md']
tasks: ['build', 'jsdoc2md']
},
scripts: {
files: ['<%= conf.src %>/**/*.js', '<%= conf.web %>/stock.js'],
Expand Down Expand Up @@ -357,7 +357,7 @@ module.exports = function (grunt) {
grunt.registerTask('ci-pull', ['test', 'jasmine:specs:build', 'connect:server']);
grunt.registerTask('lint', ['jshint', 'jscs']);
grunt.registerTask('default', ['build']);
grunt.registerTask('jsdoc', ['jsdoc2md', 'watch:jsdoc2md']);
grunt.registerTask('jsdoc', ['build', 'jsdoc2md', 'watch:jsdoc2md']);
};

module.exports.jsFiles = [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"grunt-fileindex": "^0.1.0",
"grunt-gh-pages": "~0.10.0",
"grunt-jsdoc-to-markdown": "~1.1.1",
"grunt-jscs": "~2.0.0",
"grunt-jscs": "~2.1.0",
"grunt-lib-phantomjs": "~0.7.1",
"grunt-markdown": "~0.7.0",
"grunt-saucelabs": "~8.6.1",
Expand Down
28 changes: 17 additions & 11 deletions src/bar-chart.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* Concrete bar chart/histogram implementation.
*
* Examples:
* - [Nasdaq 100 Index](http://dc-js.github.com/dc.js/)
* - [Canadian City Crime Stats](http://dc-js.github.com/dc.js/crime/index.html)
Expand All @@ -20,7 +21,7 @@
* in a [Composite Chart](#composite-chart) then pass in the parent composite chart instance.
* @param {String} [chartGroup] - The name of the chart group this chart instance should be placed in.
* Interaction with a chart will only trigger events and redraws within the chart's group.
* @returns {BarChart}
* @return {dc.barChart}
*/
dc.barChart = function (parent, chartGroup) {
var MIN_BAR_WIDTH = 1;
Expand Down Expand Up @@ -174,12 +175,13 @@ dc.barChart = function (parent, chartGroup) {
};

/**
* Whether the bar chart will render each bar centered around the data position on x axis
* Whether the bar chart will render each bar centered around the data position on the x-axis.
* @name centerBar
* @memberof dc.barChart
* @instance
* @param {Boolean} [centerBar=false]
* @returns {Boolean}
* @return {Boolean}
* @return {dc.barChart}
*/
_chart.centerBar = function (centerBar) {
if (!arguments.length) {
Expand All @@ -201,8 +203,9 @@ dc.barChart = function (parent, chartGroup) {
* @name barPadding
* @memberof dc.barChart
* @instance
* @param {Number} [barPadding]
* @returns {Number}
* @param {Number} [barPadding=0]
* @return {Number}
* @return {dc.barChart}
*/
_chart.barPadding = function (barPadding) {
if (!arguments.length) {
Expand All @@ -224,7 +227,8 @@ dc.barChart = function (parent, chartGroup) {
* @memberof dc.barChart
* @instance
* @param {Number} [padding=0.5]
* @returns {Number}
* @return {Number}
* @return {dc.barChart}
*/
_chart.outerPadding = _chart._outerRangeBandPadding;

Expand All @@ -236,7 +240,8 @@ dc.barChart = function (parent, chartGroup) {
* @memberof dc.barChart
* @instance
* @param {Number} [gap=2]
* @returns {Number}
* @return {Number}
* @return {dc.barChart}
*/
_chart.gap = function (gap) {
if (!arguments.length) {
Expand All @@ -260,19 +265,20 @@ dc.barChart = function (parent, chartGroup) {
};

/**
* Set or get whether rounding is enabled when bars are centered. Default: false. If false, using
* Set or get whether rounding is enabled when bars are centered. If false, using
* rounding with centered bars will result in a warning and rounding will be ignored. This flag
* has no effect if bars are not centered.
* has no effect if bars are not {@link #dc.barChart+centerBar centered}.
* When using standard d3.js rounding methods, the brush often doesn't align correctly with
* centered bars since the bars are offset. The rounding function must add an offset to
* compensate, such as in the following example.
* @name alwaysUseRounding
* @memberof dc.barChart
* @instance
* @example
* chart.round(function(n) {return Math.floor(n)+0.5});
* chart.round(function(n) { return Math.floor(n) + 0.5; });
* @param {Boolean} [alwaysUseRounding=false]
* @returns {Boolean}
* @return {Boolean}
* @return {dc.barChart}
*/
_chart.alwaysUseRounding = function (alwaysUseRounding) {
if (!arguments.length) {
Expand Down
Loading