The template name type, defaults to 'arrow'.
Creates a new EnergyLabel instance with the specified template and data.
Optionaltemplate: T = ...The template name to use for generating the label.
Optionaldata: Partial<TemplatesData[T]> = {}Partial template data to customize the energy label.
const label = new EnergyLabel('smartphones', {
flagOrigin: 'EU',
supplierOrTrademark: 'Sultana',
modelIdentifier: '92COU8944VK',
eprelRegistrationNumber: '3712289',
energyClass: 'D',
batteryEndurancePerCycle: 4020,
repeatedFreeFallReliabilityClass: 'C',
repairabilityClass: 'E',
batteryEnduranceInCycles: '3900',
ingressProtectionRating: 'IP14'
})
Energy label generator class that creates optimized SVG energy efficiency labels using configurable templates and data.
Example