SoC:
re_cp.test(key))
- .forEach((key) => {
- const found = key.match(re_cp)
- if (found && found[1]) {
- values['cp' + found[1]] = +(data[key] ?? 0)
- }
- })
+ Object.keys(data)
+ .filter((key) => re_cp.test(key))
+ .forEach((key) => {
+ const found = key.match(re_cp)
+ if (found && found[1]) {
+ values['cp' + found[1]] = +(data[key] ?? 0)
+ }
+ })
values.selfUsage = values.pv - values.evuOut
if (values.selfUsage < 0) {
values.selfUsage = 0
diff --git a/packages/modules/web_themes/colors/source/src/components/priceChart/GlobalPriceChart.vue b/packages/modules/web_themes/colors/source/src/components/priceChart/GlobalPriceChart.vue
index 53fe483039..1883077239 100755
--- a/packages/modules/web_themes/colors/source/src/components/priceChart/GlobalPriceChart.vue
+++ b/packages/modules/web_themes/colors/source/src/components/priceChart/GlobalPriceChart.vue
@@ -127,7 +127,11 @@ const xAxisGenerator = computed(() => {
.ticks(plotdata.value.length)
.tickSize(5)
.tickSizeInner(-height)
- .tickFormat((d) => (d.getHours() % 6 == 0 ? timeFormat('%H:%M')(d) : ''))
+ .tickFormat((d) =>
+ d.getHours() % 6 == 0 && d.getMinutes() == 0
+ ? timeFormat('%H:%M')(d)
+ : '',
+ )
})
const yAxisGenerator = computed(() => {
return (
@@ -156,7 +160,9 @@ const draw = computed(() => {
bargroups
.append('rect')
.attr('class', 'bar')
- .attr('x', (d) => xScale.value(d[0]))
+ .attr('x', (d) => {
+ return xScale.value(d[0])
+ })
.attr('y', (d) => yScale.value(d[1]))
.attr('width', barwidth.value)
.attr('height', (d) => yScale.value(yDomain.value[0]) - yScale.value(d[1]))
@@ -172,7 +178,11 @@ const draw = computed(() => {
.selectAll('.tick line')
.attr('stroke', 'var(--color-bg)')
.attr('stroke-width', (d) =>
- (d as Date).getHours() % 6 == 0 ? '2' : '0.5',
+ (d as Date).getMinutes() == 0
+ ? (d as Date).getHours() % 6 == 0
+ ? '2'
+ : '0.5'
+ : '0',
)
xAxis.select('.domain').attr('stroke', 'var(--color-bg')
// Y Axis
diff --git a/packages/modules/web_themes/colors/source/src/components/priceChart/PriceChart.vue b/packages/modules/web_themes/colors/source/src/components/priceChart/PriceChart.vue
index 7399c297cb..1ecbebd3f1 100755
--- a/packages/modules/web_themes/colors/source/src/components/priceChart/PriceChart.vue
+++ b/packages/modules/web_themes/colors/source/src/components/priceChart/PriceChart.vue
@@ -23,7 +23,7 @@
:show-subrange="true"
:subrange-min="prices[0]"
:subrange-max="prices[prices.length - 1]"
- unit="ct"
+ :unit="globalData.country == 'ch' ? 'Rp' : 'ct'"
/>
@@ -50,6 +50,7 @@