This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"locations": [ | |
{ | |
"name": "Alabama", | |
"slug": "alabama", | |
"description": "", | |
"meta": [ | |
{ | |
"image_id": 0 | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
createHorzChart(): void { | |
const options: ApexCharts.ApexOptions = { | |
chart: { id: this.chartUID || null, type: 'bar', height: 350 }, | |
series: [ | |
{ | |
name: this.seriesName, | |
data: this.data?.map((item) => item?.value), | |
label: this.data?.map((item) => item?.label) | |
} | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The standard width of a typical receipt paper is 80mm, print density is about 40-48 characters per line depending on font size. | |
// function that uses regular expressions to split the email address at logical breakpoints (i.e., before a . or after a @, etc.). | |
// It then creates a string with HTML line breaks (<br>) where the email was split. This function assumes a maximum line length of 40 characters, which is typical for point-of-sale receipt printers.: | |
function formatEmailForReceipt(email: string): string { | |
const MAX_LINE_LENGTH: number = 40; | |
const MIN_BREAKPOINT_LENGTH: number = 10; // The minimum length before a breakpoint to consider breaking | |
let lines: string[] = []; | |
let currentLine: string = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... |