hyperprop-charting-library 0.1.95 → 0.1.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2541,16 +2541,16 @@ function createChart(element, options = {}) {
2541
2541
  const drawPositionPill = (text, leftX2, centerY, bg) => {
2542
2542
  const lines = Array.isArray(text) ? text : [text];
2543
2543
  const prevFont = ctx.font;
2544
- ctx.font = `500 10px ${mergedOptions.fontFamily}`;
2545
- const padding = 5;
2546
- const lineH = 12;
2544
+ ctx.font = `500 11px ${mergedOptions.fontFamily}`;
2545
+ const padding = 6;
2546
+ const lineH = 14;
2547
2547
  const textW = Math.max(...lines.map((line) => ctx.measureText(line).width));
2548
2548
  const pillW = textW + padding * 2;
2549
- const pillH = lines.length === 1 ? 15 : lines.length * lineH + 5;
2549
+ const pillH = lines.length === 1 ? 18 : lines.length * lineH + 6;
2550
2550
  const pillX = leftX2;
2551
2551
  const pillY = centerY - pillH / 2;
2552
2552
  ctx.fillStyle = bg;
2553
- fillRoundedRect(pillX, pillY, pillW, pillH, 3);
2553
+ fillRoundedRect(pillX, pillY, pillW, pillH, 4);
2554
2554
  ctx.fillStyle = labelTextColor;
2555
2555
  ctx.textAlign = "left";
2556
2556
  ctx.textBaseline = "middle";
@@ -2515,16 +2515,16 @@ function createChart(element, options = {}) {
2515
2515
  const drawPositionPill = (text, leftX2, centerY, bg) => {
2516
2516
  const lines = Array.isArray(text) ? text : [text];
2517
2517
  const prevFont = ctx.font;
2518
- ctx.font = `500 10px ${mergedOptions.fontFamily}`;
2519
- const padding = 5;
2520
- const lineH = 12;
2518
+ ctx.font = `500 11px ${mergedOptions.fontFamily}`;
2519
+ const padding = 6;
2520
+ const lineH = 14;
2521
2521
  const textW = Math.max(...lines.map((line) => ctx.measureText(line).width));
2522
2522
  const pillW = textW + padding * 2;
2523
- const pillH = lines.length === 1 ? 15 : lines.length * lineH + 5;
2523
+ const pillH = lines.length === 1 ? 18 : lines.length * lineH + 6;
2524
2524
  const pillX = leftX2;
2525
2525
  const pillY = centerY - pillH / 2;
2526
2526
  ctx.fillStyle = bg;
2527
- fillRoundedRect(pillX, pillY, pillW, pillH, 3);
2527
+ fillRoundedRect(pillX, pillY, pillW, pillH, 4);
2528
2528
  ctx.fillStyle = labelTextColor;
2529
2529
  ctx.textAlign = "left";
2530
2530
  ctx.textBaseline = "middle";
package/dist/index.cjs CHANGED
@@ -2541,16 +2541,16 @@ function createChart(element, options = {}) {
2541
2541
  const drawPositionPill = (text, leftX2, centerY, bg) => {
2542
2542
  const lines = Array.isArray(text) ? text : [text];
2543
2543
  const prevFont = ctx.font;
2544
- ctx.font = `500 10px ${mergedOptions.fontFamily}`;
2545
- const padding = 5;
2546
- const lineH = 12;
2544
+ ctx.font = `500 11px ${mergedOptions.fontFamily}`;
2545
+ const padding = 6;
2546
+ const lineH = 14;
2547
2547
  const textW = Math.max(...lines.map((line) => ctx.measureText(line).width));
2548
2548
  const pillW = textW + padding * 2;
2549
- const pillH = lines.length === 1 ? 15 : lines.length * lineH + 5;
2549
+ const pillH = lines.length === 1 ? 18 : lines.length * lineH + 6;
2550
2550
  const pillX = leftX2;
2551
2551
  const pillY = centerY - pillH / 2;
2552
2552
  ctx.fillStyle = bg;
2553
- fillRoundedRect(pillX, pillY, pillW, pillH, 3);
2553
+ fillRoundedRect(pillX, pillY, pillW, pillH, 4);
2554
2554
  ctx.fillStyle = labelTextColor;
2555
2555
  ctx.textAlign = "left";
2556
2556
  ctx.textBaseline = "middle";
package/dist/index.js CHANGED
@@ -2515,16 +2515,16 @@ function createChart(element, options = {}) {
2515
2515
  const drawPositionPill = (text, leftX2, centerY, bg) => {
2516
2516
  const lines = Array.isArray(text) ? text : [text];
2517
2517
  const prevFont = ctx.font;
2518
- ctx.font = `500 10px ${mergedOptions.fontFamily}`;
2519
- const padding = 5;
2520
- const lineH = 12;
2518
+ ctx.font = `500 11px ${mergedOptions.fontFamily}`;
2519
+ const padding = 6;
2520
+ const lineH = 14;
2521
2521
  const textW = Math.max(...lines.map((line) => ctx.measureText(line).width));
2522
2522
  const pillW = textW + padding * 2;
2523
- const pillH = lines.length === 1 ? 15 : lines.length * lineH + 5;
2523
+ const pillH = lines.length === 1 ? 18 : lines.length * lineH + 6;
2524
2524
  const pillX = leftX2;
2525
2525
  const pillY = centerY - pillH / 2;
2526
2526
  ctx.fillStyle = bg;
2527
- fillRoundedRect(pillX, pillY, pillW, pillH, 3);
2527
+ fillRoundedRect(pillX, pillY, pillW, pillH, 4);
2528
2528
  ctx.fillStyle = labelTextColor;
2529
2529
  ctx.textAlign = "left";
2530
2530
  ctx.textBaseline = "middle";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperprop-charting-library",
3
- "version": "0.1.95",
3
+ "version": "0.1.96",
4
4
  "description": "Lightweight TypeScript charting core",
5
5
  "type": "module",
6
6
  "main": "./dist/hyperprop-charting-library.cjs",