@opendata-ai/openchart-vanilla 6.3.0 → 6.5.0

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.
package/src/tooltip.ts CHANGED
@@ -32,7 +32,7 @@ const TOOLTIP_OFFSET = 12;
32
32
  */
33
33
  export function createTooltipManager(container: HTMLElement): TooltipManager {
34
34
  const tooltip = document.createElement('div');
35
- tooltip.className = 'viz-tooltip';
35
+ tooltip.className = 'oc-tooltip';
36
36
  tooltip.setAttribute('role', 'tooltip');
37
37
 
38
38
  container.style.position = container.style.position || 'relative';
@@ -63,21 +63,21 @@ export function createTooltipManager(container: HTMLElement): TooltipManager {
63
63
  // Title row: optional color dot + title text
64
64
  if (content.title) {
65
65
  const titleColor = content.fields.find((f) => f.color)?.color;
66
- html += '<div class="viz-tooltip-header">';
66
+ html += '<div class="oc-tooltip-header">';
67
67
  if (titleColor) {
68
- html += `<span class="viz-tooltip-dot" style="background:${esc(titleColor)}"></span>`;
68
+ html += `<span class="oc-tooltip-dot" style="background:${esc(titleColor)}"></span>`;
69
69
  }
70
- html += `<span class="viz-tooltip-title">${esc(content.title)}</span>`;
70
+ html += `<span class="oc-tooltip-title">${esc(content.title)}</span>`;
71
71
  html += '</div>';
72
72
  }
73
73
 
74
74
  // Field rows
75
75
  if (content.fields.length > 0) {
76
- html += '<div class="viz-tooltip-body">';
76
+ html += '<div class="oc-tooltip-body">';
77
77
  for (const field of content.fields) {
78
- html += '<div class="viz-tooltip-row">';
79
- html += `<span class="viz-tooltip-label">${esc(field.label)}</span>`;
80
- html += `<span class="viz-tooltip-value">${esc(field.value)}</span>`;
78
+ html += '<div class="oc-tooltip-row">';
79
+ html += `<span class="oc-tooltip-label">${esc(field.label)}</span>`;
80
+ html += `<span class="oc-tooltip-value">${esc(field.value)}</span>`;
81
81
  html += '</div>';
82
82
  }
83
83
  html += '</div>';