axidio-styleguide-library1-v2 0.0.945 → 0.0.947

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.
@@ -4572,55 +4572,48 @@ class GroupChartComponent extends ComponentUniqueId {
4572
4572
  * display data values on mouse over
4573
4573
  * used by dashboard charts
4574
4574
  */
4575
- // if (
4576
- // this.chartConfiguration.textsOnBar == undefined &&
4577
- // this.chartConfiguration.displayTitleOnTop == undefined
4578
- // ) {
4579
- // state
4580
- // .selectAll('rect')
4581
- // .on('mouseout', function (d) {
4582
- // state.selectAll('.barstext').remove();
4583
- // })
4584
- // .on('mouseover', function (d1) {
4585
- // state
4586
- // .selectAll('text')
4587
- // .data(function (d) {
4588
- // let newList: any = [];
4589
- // subgroups.map(function (key) {
4590
- // if (
4591
- // key !== 'name' &&
4592
- // d1.key == key &&
4593
- // d1.value == d[key] &&
4594
- // d1.name == d.name
4595
- // ) {
4596
- // let obj: any = { key: key, value: d[key], name: d.name };
4597
- // newList.push(obj);
4598
- // }
4599
- // });
4600
- // return newList;
4601
- // })
4602
- // .enter()
4603
- // .append('text')
4604
- // .attr('class', 'barstext')
4605
- // .attr('x', function (d) {
4606
- // return xSubgroup(d.key);
4607
- // })
4608
- // .attr('y', function (d) {
4609
- // return y(d.value);
4610
- // })
4611
- // .attr(
4612
- // 'style',
4613
- // 'font-size: ' + '.85em' + ';' + ' font-weight:' + 'bold' + ';'
4614
- // )
4615
- // .style('fill', function (d) {
4616
- // return metaData.colors[d.key];
4617
- // })
4618
- // .attr('width', xSubgroup.bandwidth())
4619
- // .text(function (d) {
4620
- // return d.value;
4621
- // });
4622
- // });
4623
- // }
4575
+ if (this.chartConfiguration.textsOnBar == undefined &&
4576
+ this.chartConfiguration.displayTitleOnTop == undefined) {
4577
+ state
4578
+ .selectAll('rect')
4579
+ .on('mouseout', function (d) {
4580
+ state.selectAll('.barstext').remove();
4581
+ })
4582
+ .on('mouseover', function (d1) {
4583
+ state
4584
+ .selectAll('text')
4585
+ .data(function (d) {
4586
+ let newList = [];
4587
+ subgroups.map(function (key) {
4588
+ if (key !== 'name' &&
4589
+ d1.key == key &&
4590
+ d1.value == d[key] &&
4591
+ d1.name == d.name) {
4592
+ let obj = { key: key, value: d[key], name: d.name };
4593
+ newList.push(obj);
4594
+ }
4595
+ });
4596
+ return newList;
4597
+ })
4598
+ .enter()
4599
+ .append('text')
4600
+ .attr('class', 'barstext')
4601
+ .attr('x', function (d) {
4602
+ return xSubgroup(d.key);
4603
+ })
4604
+ .attr('y', function (d) {
4605
+ return y(d.value);
4606
+ })
4607
+ .attr('style', 'font-size: ' + '.85em' + ';' + ' font-weight:' + 'bold' + ';')
4608
+ .style('fill', function (d) {
4609
+ return metaData.colors[d.key];
4610
+ })
4611
+ .attr('width', xSubgroup.bandwidth())
4612
+ .text(function (d) {
4613
+ return d.value;
4614
+ });
4615
+ });
4616
+ }
4624
4617
  svg
4625
4618
  .append('g')
4626
4619
  .attr('class', 'x2 axis2')
@@ -9304,7 +9297,10 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9304
9297
  .on('mouseout', handleMouseOut)
9305
9298
  .on('mouseover', handleMouseOver);
9306
9299
  }
9307
- if (this.chartConfiguration.displayTitleOnTop) {
9300
+ const shouldBindMouseEvents = this.chartConfiguration.displayTitleOnTop ||
9301
+ (this.chartConfiguration.textsOnBar === undefined &&
9302
+ this.chartConfiguration.displayTitleOnTop === undefined);
9303
+ if (shouldBindMouseEvents) {
9308
9304
  state
9309
9305
  .selectAll('rect')
9310
9306
  .on('mouseout', handleMouseOut)
@@ -9426,59 +9422,6 @@ class HorizontalGroupedBarWithScrollZoomComponent extends ComponentUniqueId {
9426
9422
  * display data values on mouse over
9427
9423
  * used by dashboard charts
9428
9424
  */
9429
- // if (
9430
- // this.chartConfiguration.textsOnBar == undefined &&
9431
- // this.chartConfiguration.displayTitleOnTop == undefined
9432
- // ) {
9433
- // state
9434
- // .selectAll('rect')
9435
- // .on('mouseout', function (d) {
9436
- // state.selectAll('.barstext').remove();
9437
- // })
9438
- // .on('mouseover', function (d1) {
9439
- // state
9440
- // .selectAll('text')
9441
- // .data(function (d) {
9442
- // let newList: any = [];
9443
- // subgroups.map(function (key) {
9444
- // if (
9445
- // key !== 'name' &&
9446
- // d1.key == key &&
9447
- // d1.value == d[key] &&
9448
- // d1.name == d.name
9449
- // ) {
9450
- // let obj: any = { key: key, value: d[key], name: d.name };
9451
- // newList.push(obj);
9452
- // }
9453
- // });
9454
- // return newList;
9455
- // })
9456
- // .enter()
9457
- // .append('text')
9458
- // .attr('fill', 'var(--chart-text-color)')
9459
- // .attr('class', 'barstext')
9460
- // .attr('x', function (d) {
9461
- // return xSubgroup(d.key);
9462
- // })
9463
- // .attr('y', function (d) {
9464
- // return y(d.value);
9465
- // })
9466
- // .attr(
9467
- // 'style',
9468
- // 'font-size: ' + '.85em' + ';' + ' font-weight:' + 'bold' + ';'
9469
- // )
9470
- // .style('fill', function (d) {
9471
- // return metaData.colors[d.key];
9472
- // })
9473
- // .attr(
9474
- // 'width',
9475
- // self.isZoomedOut ? xSubgroup.bandwidth() : xSubgroup.bandwidth()
9476
- // )
9477
- // .text(function (d) {
9478
- // return d.value;
9479
- // });
9480
- // });
9481
- // }
9482
9425
  svg
9483
9426
  .append('g')
9484
9427
  .attr('class', 'x2 axis2')