myio-js-library 0.1.70 → 0.1.71

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/dist/index.cjs CHANGED
@@ -11849,6 +11849,24 @@ async function openDemandModal(params) {
11849
11849
  borderWidth: 1
11850
11850
  }));
11851
11851
  chart.options.plugins.legend.display = chartData.series.length > 1;
11852
+ chart.options.plugins.tooltip.callbacks = {
11853
+ title: function(context) {
11854
+ const timestamp = context[0].parsed.x;
11855
+ const date = new Date(timestamp);
11856
+ return date.toLocaleDateString(locale, {
11857
+ day: "2-digit",
11858
+ month: "2-digit",
11859
+ year: "numeric",
11860
+ hour: "2-digit",
11861
+ minute: "2-digit"
11862
+ });
11863
+ },
11864
+ label: function(context) {
11865
+ const seriesLabel = context.dataset.label || "";
11866
+ const value = context.parsed.y;
11867
+ return `${seriesLabel}: ${value.toFixed(2)} kW`;
11868
+ }
11869
+ };
11852
11870
  chart.update();
11853
11871
  } else {
11854
11872
  chart = new Chart(chartCanvas, {
@@ -11872,6 +11890,26 @@ async function openDemandModal(params) {
11872
11890
  // Show legend only if multiple series
11873
11891
  position: "top"
11874
11892
  },
11893
+ tooltip: {
11894
+ callbacks: {
11895
+ title: function(context) {
11896
+ const timestamp = context[0].parsed.x;
11897
+ const date = new Date(timestamp);
11898
+ return date.toLocaleDateString(locale, {
11899
+ day: "2-digit",
11900
+ month: "2-digit",
11901
+ year: "numeric",
11902
+ hour: "2-digit",
11903
+ minute: "2-digit"
11904
+ });
11905
+ },
11906
+ label: function(context) {
11907
+ const seriesLabel = context.dataset.label || "";
11908
+ const value = context.parsed.y;
11909
+ return `${seriesLabel}: ${value.toFixed(2)} kW`;
11910
+ }
11911
+ }
11912
+ },
11875
11913
  zoom: {
11876
11914
  zoom: {
11877
11915
  wheel: { enabled: true },
package/dist/index.js CHANGED
@@ -11775,6 +11775,24 @@ async function openDemandModal(params) {
11775
11775
  borderWidth: 1
11776
11776
  }));
11777
11777
  chart.options.plugins.legend.display = chartData.series.length > 1;
11778
+ chart.options.plugins.tooltip.callbacks = {
11779
+ title: function(context) {
11780
+ const timestamp = context[0].parsed.x;
11781
+ const date = new Date(timestamp);
11782
+ return date.toLocaleDateString(locale, {
11783
+ day: "2-digit",
11784
+ month: "2-digit",
11785
+ year: "numeric",
11786
+ hour: "2-digit",
11787
+ minute: "2-digit"
11788
+ });
11789
+ },
11790
+ label: function(context) {
11791
+ const seriesLabel = context.dataset.label || "";
11792
+ const value = context.parsed.y;
11793
+ return `${seriesLabel}: ${value.toFixed(2)} kW`;
11794
+ }
11795
+ };
11778
11796
  chart.update();
11779
11797
  } else {
11780
11798
  chart = new Chart(chartCanvas, {
@@ -11798,6 +11816,26 @@ async function openDemandModal(params) {
11798
11816
  // Show legend only if multiple series
11799
11817
  position: "top"
11800
11818
  },
11819
+ tooltip: {
11820
+ callbacks: {
11821
+ title: function(context) {
11822
+ const timestamp = context[0].parsed.x;
11823
+ const date = new Date(timestamp);
11824
+ return date.toLocaleDateString(locale, {
11825
+ day: "2-digit",
11826
+ month: "2-digit",
11827
+ year: "numeric",
11828
+ hour: "2-digit",
11829
+ minute: "2-digit"
11830
+ });
11831
+ },
11832
+ label: function(context) {
11833
+ const seriesLabel = context.dataset.label || "";
11834
+ const value = context.parsed.y;
11835
+ return `${seriesLabel}: ${value.toFixed(2)} kW`;
11836
+ }
11837
+ }
11838
+ },
11801
11839
  zoom: {
11802
11840
  zoom: {
11803
11841
  wheel: { enabled: true },
@@ -11764,6 +11764,24 @@
11764
11764
  borderWidth: 1
11765
11765
  }));
11766
11766
  chart.options.plugins.legend.display = chartData.series.length > 1;
11767
+ chart.options.plugins.tooltip.callbacks = {
11768
+ title: function(context) {
11769
+ const timestamp = context[0].parsed.x;
11770
+ const date = new Date(timestamp);
11771
+ return date.toLocaleDateString(locale, {
11772
+ day: "2-digit",
11773
+ month: "2-digit",
11774
+ year: "numeric",
11775
+ hour: "2-digit",
11776
+ minute: "2-digit"
11777
+ });
11778
+ },
11779
+ label: function(context) {
11780
+ const seriesLabel = context.dataset.label || "";
11781
+ const value = context.parsed.y;
11782
+ return `${seriesLabel}: ${value.toFixed(2)} kW`;
11783
+ }
11784
+ };
11767
11785
  chart.update();
11768
11786
  } else {
11769
11787
  chart = new Chart(chartCanvas, {
@@ -11787,6 +11805,26 @@
11787
11805
  // Show legend only if multiple series
11788
11806
  position: "top"
11789
11807
  },
11808
+ tooltip: {
11809
+ callbacks: {
11810
+ title: function(context) {
11811
+ const timestamp = context[0].parsed.x;
11812
+ const date = new Date(timestamp);
11813
+ return date.toLocaleDateString(locale, {
11814
+ day: "2-digit",
11815
+ month: "2-digit",
11816
+ year: "numeric",
11817
+ hour: "2-digit",
11818
+ minute: "2-digit"
11819
+ });
11820
+ },
11821
+ label: function(context) {
11822
+ const seriesLabel = context.dataset.label || "";
11823
+ const value = context.parsed.y;
11824
+ return `${seriesLabel}: ${value.toFixed(2)} kW`;
11825
+ }
11826
+ }
11827
+ },
11790
11828
  zoom: {
11791
11829
  zoom: {
11792
11830
  wheel: { enabled: true },