Published
Edited
Sep 12, 2019
Insert cell
Insert cell
value = "46001205641496720190915001200073"
Insert cell
{
const context = DOM.context2d(
400 /* width of the canvas in px */,
150 /* height of canvas in px */
);
let bc = jsbarcode(context.canvas, value, {
// Group the numbers in 4 to make it easier to key i.
'text': value.match(/.{1,4}/g).join (" ")
});
// Add the Oxxo logo
return html`<img height="300px" src="http://cdn2.dineroenimagen.com/media/dinero/styles/xlarge/public/images/2019/05/que-significa-logo-del-oxxo.jpg"><br>${context.canvas}`
}

Insert cell
jsbarcode = require('https://bundle.run/jsbarcode@3.11.0')
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more