OLD | NEW |
1 // | 1 // |
2 // Copyright 2014 Google Inc. All rights reserved. | 2 // Copyright 2014 Google Inc. All rights reserved. |
3 // | 3 // |
4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
5 // license that can be found in the LICENSE file or at | 5 // license that can be found in the LICENSE file or at |
6 // https://developers.google.com/open-source/licenses/bsd | 6 // https://developers.google.com/open-source/licenses/bsd |
7 // | 7 // |
8 | 8 |
9 /// Collection of scales for use by charts. The role of scales is to map the | 9 /// Collection of scales for use by charts. The role of scales is to map the |
10 /// input domain to an output range. | 10 /// input domain to an output range. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 /// For ordinal scale, the returned function is an identity function. | 58 /// For ordinal scale, the returned function is an identity function. |
59 FormatFunction createTickFormatter([String format]); | 59 FormatFunction createTickFormatter([String format]); |
60 | 60 |
61 /// Creates a clone of this scale. | 61 /// Creates a clone of this scale. |
62 Scale clone(); | 62 Scale clone(); |
63 | 63 |
64 /// Suggested number of ticks on this scale. | 64 /// Suggested number of ticks on this scale. |
65 /// Note: This property is only valid on quantitative scales. | 65 /// Note: This property is only valid on quantitative scales. |
66 int ticksCount; | 66 int ticksCount; |
67 | 67 |
| 68 /// Forces the number of ticks on this scale to be the forcedTicksCount. |
| 69 /// The tick values on the scale does not guarantee to be niced numbers, but |
| 70 /// domain of the scale does. |
| 71 /// Note: This property is only valid on quantitative scales. |
| 72 int forcedTicksCount; |
| 73 |
68 /// Indicates if the current scale is using niced values for ticks. | 74 /// Indicates if the current scale is using niced values for ticks. |
69 /// Note: This property is only valid on quantitative scales. | 75 /// Note: This property is only valid on quantitative scales. |
70 bool nice; | 76 bool nice; |
71 | 77 |
72 /// Indicates if output range is clamped. When clamp is not true, any input | 78 /// Indicates if output range is clamped. When clamp is not true, any input |
73 /// value that is not within the input domain may result in a value that is | 79 /// value that is not within the input domain may result in a value that is |
74 /// outside the output range. | 80 /// outside the output range. |
75 /// Note: This property is only valid on quantitative scales. | 81 /// Note: This property is only valid on quantitative scales. |
76 bool clamp; | 82 bool clamp; |
77 | 83 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 hi = mid; | 228 hi = mid; |
223 } else { | 229 } else { |
224 lo = mid + 1; | 230 lo = mid + 1; |
225 } | 231 } |
226 } | 232 } |
227 return lo; | 233 return lo; |
228 } | 234 } |
229 | 235 |
230 static Function bisect = bisectRight; | 236 static Function bisect = bisectRight; |
231 } | 237 } |
OLD | NEW |