MCPcopy Create free account
hub / github.com/chartjs/Chart.js / BarController

Class BarController

src/controllers/controller.bar.js:258–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258export default class BarController extends DatasetController {
259
260 static id = 'bar';
261
262 /**
263 * @type {any}
264 */
265 static defaults = {
266 datasetElementType: false,
267 dataElementType: 'bar',
268
269 categoryPercentage: 0.8,
270 barPercentage: 0.9,
271 grouped: true,
272
273 animations: {
274 numbers: {
275 type: 'number',
276 properties: ['x', 'y', 'base', 'width', 'height']
277 }
278 }
279 };
280
281 /**
282 * @type {any}
283 */
284 static overrides = {
285 scales: {
286 _index_: {
287 type: 'category',
288 offset: true,
289 grid: {
290 offset: true
291 }
292 },
293 _value_: {
294 type: 'linear',
295 beginAtZero: true,
296 }
297 }
298 };
299
300
301 /**
302 * Overriding primitive data parsing since we support mixed primitive/array
303 * data for float bars
304 * @protected
305 */
306 parsePrimitiveData(meta, data, start, count) {
307 return parseArrayOrPrimitive(meta, data, start, count);
308 }
309
310 /**
311 * Overriding array data parsing since we support mixed primitive/array
312 * data for float bars
313 * @protected
314 */
315 parseArrayData(meta, data, start, count) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected