Skip to content

Commit

Permalink
following the apache coding standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Pashted committed Dec 24, 2023
1 parent c711f3a commit 0e29090
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 74 deletions.
2 changes: 1 addition & 1 deletion src/chart/pie/PieSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class PieSeriesModel extends SeriesModel<PieSeriesOption> {
/* useful for custom percentage calculations in formatters etc. */
params.maxValue = data.getDataExtent(valueDim)[1];
params.$vars.push('maxValue');
params.sum = data.getSum(valueDim);
params.sum = data.getSum(valueDim);
params.$vars.push('sum');
}
return params;
Expand Down
2 changes: 1 addition & 1 deletion src/chart/pie/pieLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default function pieLayout(

let outerRadius = r;
if (typeof itemRadiusScale === 'function') {
// calculate the radius of the current pie item based on the scale from the used-defined function
// calculate the radius of the current pie item based on the scale from the user-defined function
let scale = itemRadiusScale(seriesModel.getDataParams(idx)) || 0;
// scale should always be between 0 and 1
scale = Math.max(0, Math.min(scale, 1));
Expand Down
191 changes: 119 additions & 72 deletions test/pie-itemRadiusScale.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e29090

Please sign in to comment.