@sapui5/sap.viz 1.141.1 → 1.142.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.
@@ -4299,7 +4299,6 @@ define('sap/viz/chart/components/util/ColorUtil',["sap/viz/framework/common/util
4299
4299
 
4300
4300
  return ColorUtil;
4301
4301
  });
4302
-
4303
4302
  define('sap/viz/chart/components/plots/PlotHelper',[
4304
4303
  'jquery'
4305
4304
 
@@ -7621,7 +7620,7 @@ define('sap/viz/chart/components/legend/ColorLegend',[
7621
7620
  var retWidth = 0;
7622
7621
  if (isHorizontal) {
7623
7622
  if(!isScrollable && showFullLegend){
7624
- retWidth = expectedWidth + markerWidth + markerMargin.right * textHeight + HORIZONTAL_OFFSET;
7623
+ retWidth = expectedWidth + markerWidth + markerMargin.right * textHeight + HORIZONTAL_OFFSET*2;
7625
7624
  }else{
7626
7625
  var regularItemWidth = eachItemWidth + HORIZONTAL_OFFSET - markerMargin.right * textHeight;
7627
7626
 
@@ -10130,8 +10129,8 @@ return {
10130
10129
  "interaction.hover.stroke.visible": true,
10131
10130
  "interaction.hover.stroke.width": "2px",
10132
10131
  "interaction.keyboard.color": "#000000",
10133
- "interaction.keyboard.width": "1px",
10134
10132
  "interaction.keyboard.style": "solid",
10133
+ "interaction.keyboard.width": "1px",
10135
10134
  "interaction.noninteractiveMode": false,
10136
10135
  "interaction.selectability.axisLabelSelection": true,
10137
10136
  "interaction.selectability.behavior": {
@@ -10361,8 +10360,8 @@ return {
10361
10360
  "interaction.hover.stroke.visible": true,
10362
10361
  "interaction.hover.stroke.width": "2px",
10363
10362
  "interaction.keyboard.color": "#000000",
10364
- "interaction.keyboard.width": "1px",
10365
10363
  "interaction.keyboard.style": "solid",
10364
+ "interaction.keyboard.width": "1px",
10366
10365
  "interaction.noninteractiveMode": false,
10367
10366
  "interaction.selectability.axisLabelSelection": true,
10368
10367
  "interaction.selectability.behavior": {
@@ -10625,8 +10624,8 @@ return {
10625
10624
  "interaction.hover.stroke.visible": true,
10626
10625
  "interaction.hover.stroke.width": "2px",
10627
10626
  "interaction.keyboard.color": "#000000",
10628
- "interaction.keyboard.width": "1px",
10629
10627
  "interaction.keyboard.style": "solid",
10628
+ "interaction.keyboard.width": "1px",
10630
10629
  "interaction.noninteractiveMode": false,
10631
10630
  "interaction.selectability.behavior": {
10632
10631
  "access": "internal",
@@ -10802,8 +10801,8 @@ return {
10802
10801
  "interaction.hover.stroke.visible": true,
10803
10802
  "interaction.hover.stroke.width": "2px",
10804
10803
  "interaction.keyboard.color": "#000000",
10805
- "interaction.keyboard.width": "1px",
10806
10804
  "interaction.keyboard.style": "solid",
10805
+ "interaction.keyboard.width": "1px",
10807
10806
  "interaction.noninteractiveMode": false,
10808
10807
  "interaction.selectability.behavior": {
10809
10808
  "access": "internal",
@@ -11064,8 +11063,8 @@ return {
11064
11063
  "interaction.hover.stroke.visible": true,
11065
11064
  "interaction.hover.stroke.width": "2px",
11066
11065
  "interaction.keyboard.color": "#000000",
11067
- "interaction.keyboard.width": "1px",
11068
11066
  "interaction.keyboard.style": "solid",
11067
+ "interaction.keyboard.width": "1px",
11069
11068
  "interaction.noninteractiveMode": false,
11070
11069
  "interaction.selectability.axisLabelSelection": true,
11071
11070
  "interaction.selectability.behavior": {
@@ -12193,8 +12192,8 @@ return {
12193
12192
  "interaction.hover.stroke.visible": true,
12194
12193
  "interaction.hover.stroke.width": "2px",
12195
12194
  "interaction.keyboard.color": "#000000",
12196
- "interaction.keyboard.width": "1px",
12197
12195
  "interaction.keyboard.style": "solid",
12196
+ "interaction.keyboard.width": "1px",
12198
12197
  "interaction.noninteractiveMode": false,
12199
12198
  "interaction.selectability.axisLabelSelection": true,
12200
12199
  "interaction.selectability.behavior": {
@@ -14204,8 +14203,8 @@ return {
14204
14203
  "interaction.hover.stroke.visible": true,
14205
14204
  "interaction.hover.stroke.width": "2px",
14206
14205
  "interaction.keyboard.color": "#000000",
14207
- "interaction.keyboard.width": "1px",
14208
14206
  "interaction.keyboard.style": "solid",
14207
+ "interaction.keyboard.width": "1px",
14209
14208
  "interaction.noninteractiveMode": false,
14210
14209
  "interaction.selectability.axisLabelSelection": true,
14211
14210
  "interaction.selectability.behavior": {
@@ -14804,8 +14803,8 @@ return {
14804
14803
  "interaction.hover.stroke.visible": true,
14805
14804
  "interaction.hover.stroke.width": "2px",
14806
14805
  "interaction.keyboard.color": "#000000",
14807
- "interaction.keyboard.width": "1px",
14808
14806
  "interaction.keyboard.style": "solid",
14807
+ "interaction.keyboard.width": "1px",
14809
14808
  "interaction.noninteractiveMode": false,
14810
14809
  "interaction.selectability.axisLabelSelection": true,
14811
14810
  "interaction.selectability.behavior": {
@@ -15198,8 +15197,8 @@ return {
15198
15197
  "interaction.hover.stroke.visible": true,
15199
15198
  "interaction.hover.stroke.width": "2px",
15200
15199
  "interaction.keyboard.color": "#000000",
15201
- "interaction.keyboard.width": "1px",
15202
15200
  "interaction.keyboard.style": "solid",
15201
+ "interaction.keyboard.width": "1px",
15203
15202
  "interaction.noninteractiveMode": false,
15204
15203
  "interaction.selectability.axisLabelSelection": true,
15205
15204
  "interaction.selectability.behavior": {
@@ -16633,8 +16632,8 @@ return {
16633
16632
  "interaction.hover.stroke.visible": true,
16634
16633
  "interaction.hover.stroke.width": "2px",
16635
16634
  "interaction.keyboard.color": "#000000",
16636
- "interaction.keyboard.width": "1px",
16637
16635
  "interaction.keyboard.style": "solid",
16636
+ "interaction.keyboard.width": "1px",
16638
16637
  "interaction.noninteractiveMode": false,
16639
16638
  "interaction.selectByTimeAxisGroup": {
16640
16639
  "access": "internal",
@@ -16946,8 +16945,8 @@ return {
16946
16945
  "interaction.hover.stroke.visible": true,
16947
16946
  "interaction.hover.stroke.width": "2px",
16948
16947
  "interaction.keyboard.color": "#000000",
16949
- "interaction.keyboard.width": "1px",
16950
16948
  "interaction.keyboard.style": "solid",
16949
+ "interaction.keyboard.width": "1px",
16951
16950
  "interaction.noninteractiveMode": false,
16952
16951
  "interaction.selectability.axisLabelSelection": true,
16953
16952
  "interaction.selectability.behavior": {
@@ -17236,8 +17235,8 @@ return {
17236
17235
  "interaction.hover.stroke.visible": true,
17237
17236
  "interaction.hover.stroke.width": "2px",
17238
17237
  "interaction.keyboard.color": "#000000",
17239
- "interaction.keyboard.width": "1px",
17240
17238
  "interaction.keyboard.style": "solid",
17239
+ "interaction.keyboard.width": "1px",
17241
17240
  "interaction.noninteractiveMode": false,
17242
17241
  "interaction.selectability.axisLabelSelection": true,
17243
17242
  "interaction.selectability.behavior": {
@@ -18201,9 +18200,9 @@ define('sap/viz/chart/behavior/config/handler/AxisBehaviorHandler',[
18201
18200
  return;
18202
18201
  }
18203
18202
 
18204
- var color;
18205
18203
  var lineColor = service.getProperties().get("interaction.selected.stroke.color");
18206
18204
  var outlineWidth = service.getProperties().get("interaction.keyboard.width");
18205
+ var color;
18207
18206
 
18208
18207
  if(isTriggerable(service)) {
18209
18208
  var radar = service._getChartType().toLowerCase() === 'radar';
@@ -18214,7 +18213,7 @@ define('sap/viz/chart/behavior/config/handler/AxisBehaviorHandler',[
18214
18213
  }
18215
18214
 
18216
18215
  color = service.getProperties().get(axisName+".mouseDownShadow.color");
18217
-
18216
+
18218
18217
  }
18219
18218
  else if(isTimeAxisTriggerable(service)) {
18220
18219
  color = service.getProperties().get("timeAxis"+".mouseDownShadow.color");
@@ -18222,14 +18221,11 @@ define('sap/viz/chart/behavior/config/handler/AxisBehaviorHandler',[
18222
18221
  else {
18223
18222
  return;
18224
18223
  }
18225
-
18226
18224
  service.getNodes(service.NodeType.AXIS_ITEM_BACKGROUND)
18227
18225
  .attr("fill", "transparent")
18228
18226
  .classed(CSS_CLASS.HOVER_SHADOW, false);
18229
-
18230
- var label_selector = service.NodeType.AXIS_ITEM_BACKGROUND.get('value');
18231
-
18232
18227
  if (color) {
18228
+ var label_selector = service.NodeType.AXIS_ITEM_BACKGROUND.get('value');
18233
18229
  d3.select(event.data.currentTarget).select(label_selector)
18234
18230
  .attr("fill", color)
18235
18231
  .classed(CSS_CLASS.FOCUS_SHADOW, true)
@@ -18250,7 +18246,7 @@ define('sap/viz/chart/behavior/config/handler/AxisBehaviorHandler',[
18250
18246
  if(radar){
18251
18247
  axisName = 'plotArea.polarAxis';
18252
18248
  }
18253
-
18249
+
18254
18250
  color = service.getProperties().get(axisName+".hoverShadow.color");
18255
18251
  }
18256
18252
  else if(isTimeAxisTriggerable(service)) {
@@ -18444,6 +18440,117 @@ define('sap/viz/chart/behavior/config/HighlightHelper',[
18444
18440
  return TypeUtils.isArray(elem) ? elem : [elem];
18445
18441
  }
18446
18442
 
18443
+ function drawInnerStroke(service, e, selector, mode, prop, defaultWidth, selectAll, extraData) {
18444
+ var strokeStyle = service.getProperties().get("interaction.keyboard.style");
18445
+ var zeroHoverNode = d3.select('.' + Constants.CSS.CLASS.ZEROVALUEHOVER).node();
18446
+ var child = d3.select(e).selectAll(selector);
18447
+
18448
+ if (TypeUtils.isExist(zeroHoverNode) && TypeUtils.isExist(extraData)) {
18449
+ if (extraData.isZeroOnFirstTab) {
18450
+ child = d3.select(zeroHoverNode).selectAll(selector);
18451
+ }
18452
+ }
18453
+
18454
+ if (!selectAll && child && child[0] && child[0].length > 1) {
18455
+ var temp = child[0];
18456
+ child = d3.select(temp[temp.length - 1]);
18457
+ }
18458
+
18459
+ var isZeroValue = TypeUtils.isExist(extraData) ? extraData.isZeroValue : false;
18460
+ if (!isZeroValue) {
18461
+ child.attr("stroke-dasharray", undefined);
18462
+ }
18463
+
18464
+ var rect = child.node();
18465
+ if (!rect) {
18466
+ return;
18467
+ }
18468
+
18469
+ var rawWidth = getWidth((prop && prop.width), defaultWidth);
18470
+ var numericWidth = parseFloat(rawWidth);
18471
+ var strokeWidth = (isNaN(numericWidth) ? 2 : numericWidth) * 2;
18472
+
18473
+ if (rect.tagName && rect.tagName.toLowerCase() !== "rect") {
18474
+ if (prop && prop.visible === true) {
18475
+ drawStroke(service, e, selector, prop, defaultWidth, selectAll, extraData);
18476
+ } else {
18477
+ var fillColorFallback = getColors(service, e, prop && prop.color);
18478
+ d3.select(e).selectAll(selector)
18479
+ .attr("stroke", null)
18480
+ .attr("stroke-width", null)
18481
+ .attr("stroke-dasharray", null)
18482
+ .attr("clip-path", null)
18483
+ .attr("fill",
18484
+ fillColorFallback &&
18485
+ (
18486
+ fillColorFallback.customizedColor ||
18487
+ fillColorFallback.defaultColor
18488
+ )
18489
+ );
18490
+ }
18491
+ return;
18492
+ }
18493
+
18494
+ var width = parseFloat(child.attr("width"));
18495
+ var height = parseFloat(child.attr("height"));
18496
+ var dataId = d3.select(e).attr("data-datapoint-id") || Math.random().toString(36).slice(2);
18497
+ var clipId = "inner-stroke-clip-" + mode + "-" + dataId;
18498
+
18499
+ var svg = d3.select(e.ownerSVGElement || e.closest("svg"));
18500
+ var defs = svg.select("defs");
18501
+ if (defs.empty()) {
18502
+ defs = svg.append("defs");
18503
+ }
18504
+
18505
+ if (prop && prop.visible === true) {
18506
+ var currentClip = child.attr("clip-path");
18507
+ if (currentClip && currentClip.indexOf("inner-stroke-clip-") === 0 && currentClip.indexOf(mode) === -1) {
18508
+ return;
18509
+ }
18510
+
18511
+ var clipPath = defs.select("#" + clipId);
18512
+ if (clipPath.empty()) {
18513
+ clipPath = defs.append("clipPath").attr("id", clipId);
18514
+ clipPath.append("rect");
18515
+ }
18516
+
18517
+ clipPath.select("rect")
18518
+ .attr("x", 0.5)
18519
+ .attr("y", 0.5)
18520
+ .attr("width", Math.max(0, width - 1))
18521
+ .attr("height", Math.max(0, height - 1));
18522
+
18523
+ var strokeColor = getColors(service, e, prop.color);
18524
+ child
18525
+ .attr("stroke", strokeColor.customizedColor || strokeColor.defaultColor)
18526
+ .attr("stroke-width", strokeWidth)
18527
+ .attr("clip-path", "url(#" + clipId + ")")
18528
+ .style("outline", "none");
18529
+
18530
+ if (mode === 'keyboard') {
18531
+ if (strokeStyle === "solid") {
18532
+ child.attr("stroke-dasharray", null);
18533
+ } else if (strokeStyle === "dotted") {
18534
+ child.attr("stroke-dasharray", strokeWidth);
18535
+ } else {
18536
+ child.attr("stroke-dasharray", strokeWidth);
18537
+ }
18538
+ } else {
18539
+ child.attr("stroke-dasharray", null);
18540
+ }
18541
+ } else {
18542
+
18543
+ var fillColor = getColors(service, e, prop.color);
18544
+ d3.select(e).selectAll(selector)
18545
+ .attr("stroke", null)
18546
+ .attr("stroke-width", null)
18547
+ .attr("clip-path", null)
18548
+ .attr("stroke-dasharray", null)
18549
+ .attr("fill", fillColor.customizedColor || fillColor.defaultColor);
18550
+ defs.select("#inner-stroke-clip-" + mode + "-" + dataId).remove();
18551
+ }
18552
+ }
18553
+
18447
18554
  function drawStroke(service, e, selector, prop, defaultWidth, selectAll, extraData) {
18448
18555
  var zeroHoverNode = d3.select('.' + Constants.CSS.CLASS.ZEROVALUEHOVER).node();
18449
18556
  var child = d3.select(e).selectAll(selector);
@@ -18561,6 +18668,7 @@ define('sap/viz/chart/behavior/config/HighlightHelper',[
18561
18668
  turnToArray: turnToArray,
18562
18669
  getColors : getColors,
18563
18670
  drawStroke : drawStroke,
18671
+ drawInnerStroke : drawInnerStroke,
18564
18672
  drawFill : drawFill,
18565
18673
  getWidth : getWidth,
18566
18674
  getDeselAllExTargets: getDeselAllExTargets,
@@ -20592,6 +20700,46 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
20592
20700
 
20593
20701
  var getColors = HighlightHelper.getColors;
20594
20702
 
20703
+ function checkColorContrast(fill, bgcolor, threshold) {
20704
+ if (fill && bgcolor) {
20705
+ var ratioObj = ColorUtil.checkColorContrast(bgcolor, fill, threshold);
20706
+ if (!ratioObj.meetsThreshold) {
20707
+ var stroke = ACCStyleUtils.getBorderColor(fill);
20708
+ return stroke;
20709
+ }
20710
+ }
20711
+ return null;
20712
+ }
20713
+ function hasPropCustomizeValue(propsMgr, propName) {
20714
+ return propsMgr._props[propName].hasOwnProperty('customizeValue');
20715
+ }
20716
+ function hasPropValue(propsMgr, propName) {
20717
+ return propsMgr._props[propName].hasOwnProperty('value');
20718
+ }
20719
+
20720
+ function getStrokeColor(service, extraData) {
20721
+ var propMgr = service.getProperties();
20722
+ var strokeColor = "plotArea.dataPoint.stroke.color";
20723
+ var strokeVisible = "plotArea.dataPoint.stroke.visible";
20724
+
20725
+ if(hasPropCustomizeValue(propMgr, strokeColor) || hasPropValue(propMgr, strokeColor)) {
20726
+ return propMgr.get(strokeColor);
20727
+ }
20728
+ var BGCOLORPROPS = ["plotArea.grid.background.color",
20729
+ "plotArea.background.color",
20730
+ "general.background.color"];
20731
+ var textVisible = propMgr.get('plotArea.dataLabel.visible');
20732
+ var template = service.getEffectManager()._getTemplate().name;
20733
+ var theme = ACCStyleUtils.getTheme(template);
20734
+ var chartType = service._getChartType();
20735
+ var threshold = ACCStyleUtils.getThreshold(theme, chartType, textVisible);
20736
+ var bgcolor = ColorUtil.getBgColor(propMgr,
20737
+ propMgr.get(strokeVisible) ? BGCOLORPROPS.concat(strokeColor) : BGCOLORPROPS);
20738
+
20739
+ var stroke = checkColorContrast(extraData.color, bgcolor, threshold);
20740
+ return stroke? stroke : propMgr.get(strokeColor);
20741
+ }
20742
+
20595
20743
  function getShape(plot, dataPoint){
20596
20744
  return plot && plot.getDataPointShape && plot.getDataPointShape(dataPoint);
20597
20745
  }
@@ -21272,13 +21420,21 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
21272
21420
  var prop = properties.get('interaction.selected');
21273
21421
  var isMarkerRenderExist = TypeUtils.isExist(properties.get('plotArea.markerRenderer'));
21274
21422
  var lineRenderer;
21423
+ var isAccEnable = properties.get("interaction.enableAccUpdates");
21275
21424
  elements.forEach(function(e) {
21276
21425
  var extraData = DataGraphics.getData(e);
21277
21426
  var bSetChildOpacity = !extraData.isZeroValue;
21278
21427
  DataPointUtils.highlight(e);
21279
21428
  lineRenderer = Handler.getLineRenderer(service, e);
21280
21429
  Handler.renderLightLine(service, e, true, lineRenderer);
21281
- HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, 1, undefined, extraData);
21430
+ if (isAccEnable) {
21431
+ HighlightHelper.drawInnerStroke(
21432
+ service, e, 'rect, path', 'select', prop.stroke,
21433
+ DataGraphics.getData(e).strokeWidth, false, DataGraphics.getData(e)
21434
+ );
21435
+ } else {
21436
+ HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, 1, undefined, extraData);
21437
+ }
21282
21438
  HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
21283
21439
  });
21284
21440
  };
@@ -21318,21 +21474,46 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
21318
21474
  };
21319
21475
 
21320
21476
  Handler.selectOnBarOnNormalMode = function(event, service){
21477
+ var isAccEnable = service.getProperties().get("interaction.enableAccUpdates");
21321
21478
  var elements = HighlightHelper.turnToArray(event.data.targets);
21322
21479
  var properties = service.getProperties();
21323
21480
  service._getDecorationLayer().clear();
21324
21481
  service.fireEvent(event, true);
21325
21482
  var prop = properties.get('interaction.selected');
21326
21483
  var isMarkerRendererExist = TypeUtils.isExist(properties.get('plotArea.markerRenderer'));
21327
- elements.forEach(function(e) {
21328
- var extraData = DataGraphics.getData(e);
21329
- var tag = "rect";
21330
- if (extraData.pattern === "noFill") {
21331
- tag = "rect, path";
21332
- }
21333
- HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, 1, undefined, extraData);
21334
- HighlightHelper.drawFill(service, e, tag, prop, isMarkerRendererExist);
21335
- });
21484
+ if (!isAccEnable) {
21485
+ elements.forEach(function (e) {
21486
+ var extraData = DataGraphics.getData(e);
21487
+ var tag = "rect";
21488
+ if (extraData.pattern === "noFill") {
21489
+ tag = "rect, path";
21490
+ }
21491
+ HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, 1, undefined, extraData);
21492
+ HighlightHelper.drawFill(service, e, tag, prop, isMarkerRendererExist);
21493
+ });
21494
+ } else {
21495
+ elements.forEach(function (e) {
21496
+ var extraData = DataGraphics.getData(e);
21497
+ var tag = extraData.pattern === "noFill" ? "rect, path" : "rect";
21498
+
21499
+
21500
+ var strokeProp = {};
21501
+ for (var key in prop.stroke) {
21502
+ if (prop.stroke.hasOwnProperty(key)) {
21503
+ strokeProp[key] = prop.stroke[key];
21504
+ }
21505
+ }
21506
+ strokeProp.isSelect = true;
21507
+
21508
+ HighlightHelper.drawInnerStroke(
21509
+ service, e, 'rect', "select", strokeProp,
21510
+ extraData.strokeWidth, false, extraData
21511
+ );
21512
+
21513
+
21514
+ HighlightHelper.drawFill(service, e, tag, prop, isMarkerRendererExist);
21515
+ });
21516
+ }
21336
21517
  };
21337
21518
 
21338
21519
  Handler.highlightOnCombDuringBigData = function (event, service) {
@@ -21589,6 +21770,7 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
21589
21770
 
21590
21771
  var plot = service.getModule("main.plot");
21591
21772
  var dataModel = service.getDataModel();
21773
+ var isAccEnable = service.getProperties().get("interaction.enableAccUpdates");
21592
21774
 
21593
21775
  elements.forEach(function (e) {
21594
21776
  if(service.isTrellis()){
@@ -21604,9 +21786,42 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
21604
21786
  HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, 2);
21605
21787
  HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRendererExist, true);
21606
21788
  } else {
21607
- if (!event.data.byKeyboard) {
21608
- var extraData = DataGraphics.getData(e);
21609
- HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, 2, undefined, extraData);
21789
+ if (isAccEnable) {
21790
+ if (!event.data.byKeyboard) {
21791
+ var strokeProp = {};
21792
+ for (var key in prop.stroke) {
21793
+ if (prop.stroke.hasOwnProperty(key)) {
21794
+ strokeProp[key] = prop.stroke[key];
21795
+ }
21796
+ }
21797
+ strokeProp.isHover = true;
21798
+
21799
+ HighlightHelper.drawInnerStroke(
21800
+ service, e, 'rect', "hover", strokeProp,
21801
+ DataGraphics.getData(e).strokeWidth, false, DataGraphics.getData(e)
21802
+ );
21803
+ } else {
21804
+ var keyboardStrokeProp = {};
21805
+ var keyProp = props.get('interaction.keyboard');
21806
+ for (var i in keyProp) {
21807
+ if (keyProp.hasOwnProperty(i)) {
21808
+ keyboardStrokeProp[i] = keyProp[i];
21809
+ }
21810
+ }
21811
+ keyboardStrokeProp.visible = true;
21812
+ d3.select(e).select('.v-m-highlight').remove();
21813
+ HighlightHelper.drawInnerStroke(
21814
+ service, e, 'rect', "keyboard", keyboardStrokeProp,
21815
+ undefined,
21816
+ false,
21817
+ undefined
21818
+ );
21819
+ }
21820
+ } else {
21821
+ if (!event.data.byKeyboard) {
21822
+ var extraData = DataGraphics.getData(e);
21823
+ HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, 2, undefined, extraData);
21824
+ }
21610
21825
  }
21611
21826
  HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
21612
21827
  }
@@ -21639,67 +21854,149 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
21639
21854
  var plot = service.getModule("main.plot");
21640
21855
  var dataModel = service.getDataModel();
21641
21856
  var isAccEnable = service.getProperties().get("interaction.enableAccUpdates");
21642
- elements.forEach(function (e) {
21643
- var dataId = DataPointUtils.getDataPointId(e);
21644
- var dataPoint = dataModel.getDataPoint(dataId);
21645
- if (dataPoint) {
21646
- var shape = getShape(plot, dataPoint);
21857
+ if (!isAccEnable) {
21858
+ elements.forEach(function (e) {
21859
+ var dataId = DataPointUtils.getDataPointId(e);
21860
+ var dataPoint = dataModel.getDataPoint(dataId);
21861
+ if (dataPoint) {
21862
+ var shape = getShape(plot, dataPoint);
21647
21863
 
21648
- var visible;
21649
- var width = 1;
21650
- var extraData;
21651
- if (d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED)) {
21652
- prop = props.get('interaction.selected');
21653
- visible = true;
21654
- } else {
21655
- if (service.shouldUseDeselectedColor()) {
21656
- prop = props.get('interaction.deselected');
21864
+ var visible;
21865
+ var width = 1;
21866
+ var extraData;
21867
+ if (d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED)) {
21868
+ prop = props.get('interaction.selected');
21869
+ visible = true;
21657
21870
  } else {
21658
- prop = props.get('plotArea.dataPoint');
21659
- extraData = DataGraphics.getData(e);
21660
- if (extraData) {
21661
- width = extraData.strokeWidth;
21871
+ if (service.shouldUseDeselectedColor()) {
21872
+ prop = props.get('interaction.deselected');
21873
+ } else {
21874
+ prop = props.get('plotArea.dataPoint');
21875
+ extraData = DataGraphics.getData(e);
21876
+ if (extraData) {
21877
+ width = extraData.strokeWidth;
21878
+ }
21662
21879
  }
21880
+ visible = false;
21881
+ }
21882
+
21883
+ if (shape === "line") {
21884
+ HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width);
21885
+ HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRendererExist, true);
21886
+ if (!visible) {
21887
+ setMakerOpacity(service, e);
21888
+ }
21889
+ } else {
21890
+ extraData = DataGraphics.getData(e);
21891
+ HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, width, undefined, extraData);
21892
+ HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
21663
21893
  }
21664
- visible = false;
21665
21894
  }
21895
+ });
21896
+ } else {
21897
+ elements = elements.filter(function (e) {
21898
+ var dataId = DataPointUtils.getDataPointId(e);
21899
+ return dataModel.getDataPoint(dataId) !== undefined;
21900
+ });
21901
+ elements.forEach(function (e) {
21902
+ var dataId = DataPointUtils.getDataPointId(e);
21903
+ var dataPoint = dataModel.getDataPoint(dataId);
21904
+ if (dataPoint) {
21905
+ var shape = getShape(plot, dataPoint);
21666
21906
 
21667
- if(shape === "line"){
21668
- HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width);
21669
- HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRendererExist, true);
21670
- if (!visible) {
21671
- setMakerOpacity(service, e);
21907
+ var visible;
21908
+ var width = 1;
21909
+ var extraData;
21910
+
21911
+ if (d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED)) {
21912
+ prop = props.get('interaction.selected');
21913
+ visible = true;
21914
+ var strokeProp = {};
21915
+ for (var key in prop.stroke) {
21916
+ if (prop.stroke.hasOwnProperty(key)) {
21917
+ strokeProp[key] = prop.stroke[key];
21918
+ }
21919
+ }
21920
+ strokeProp.isHover = false;
21921
+ HighlightHelper.drawInnerStroke(
21922
+ service,
21923
+ e,
21924
+ 'rect',
21925
+ "select",
21926
+ strokeProp,
21927
+ extraData ? extraData.strokeWidth : 1,
21928
+ true,
21929
+ extraData
21930
+ );
21931
+ } else {
21932
+ if (service.shouldUseDeselectedColor()) {
21933
+ prop = props.get('interaction.deselected');
21934
+ } else {
21935
+ prop = props.get('plotArea.dataPoint');
21936
+ extraData = DataGraphics.getData(e);
21937
+ if (extraData) {
21938
+ width = extraData.strokeWidth;
21939
+ }
21940
+ }
21941
+ visible = false;
21672
21942
  }
21673
- }else{
21674
- extraData = DataGraphics.getData(e);
21675
- if (isAccEnable) {
21676
- var BGCOLORPROPS = [ "plotArea.grid.background.color",
21677
- "plotArea.background.color",
21678
- "general.background.color"];
21679
- var propMgr = service.getProperties();
21680
- var textVisible = propMgr.get('plotArea.dataLabel.visible');
21681
- var template = service.getEffectManager()._getTemplate().name;
21682
- var theme = ACCStyleUtils.getTheme(template);
21683
- var chartType = service._getChartType();
21684
- var threshold = ACCStyleUtils.getThreshold(theme, chartType, textVisible);
21685
- var strokeColor = "plotArea.dataPoint.stroke.color";
21686
- var strokeVisible = "plotArea.dataPoint.stroke.visible";
21687
- var bgcolor = ColorUtil.getBgColor(propMgr,
21688
- propMgr.get(strokeVisible) ? BGCOLORPROPS.concat(strokeColor) : BGCOLORPROPS);
21689
- var fill = extraData.color;
21690
- if (fill && bgcolor) {
21691
- var ratioObj = ColorUtil.checkColorContrast(bgcolor, fill, threshold);
21692
- if (!ratioObj.meetsThreshold) {
21693
- var stroke = ACCStyleUtils.getBorderColor(extraData.color);
21694
- prop.stroke.color = stroke ? stroke : prop.stroke.color;
21943
+
21944
+ if (shape === "line") {
21945
+ HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width);
21946
+ HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRendererExist, true);
21947
+ if (!visible) {
21948
+ setMakerOpacity(service, e);
21949
+ }
21950
+ } else {
21951
+ extraData = DataGraphics.getData(e);
21952
+ if (!d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED)) {
21953
+ var strokeProperty = {};
21954
+ for (var k in prop.stroke) {
21955
+ if (prop.stroke.hasOwnProperty(k)) {
21956
+ strokeProperty[k] = prop.stroke[k];
21957
+ }
21958
+ }
21959
+ strokeProperty.visible = false;
21960
+ strokeProperty.isHover = true;
21961
+
21962
+ HighlightHelper.drawInnerStroke(
21963
+ service,
21964
+ e,
21965
+ 'rect',
21966
+ "hover",
21967
+ strokeProperty,
21968
+ extraData.strokeWidth,
21969
+ true,
21970
+ extraData
21971
+ );
21972
+ if (d3.select(e).classed(CSS_CLASS.DATAPOINTDESELECTED)) {
21973
+ var deselectProp = service.getProperties().get('interaction.deselected');
21974
+ HighlightHelper.drawInnerStroke(
21975
+ service,
21976
+ e,
21977
+ 'rect',
21978
+ 'deselect',
21979
+ deselectProp.stroke,
21980
+ (extraData && extraData.strokeWidth) || 1,
21981
+ true,
21982
+ extraData || {}
21983
+ );
21695
21984
  }
21985
+ var isExcludedChartType = ACCStyleUtils.isExcludedChartType(service._getChartType());
21986
+ prop.stroke.color = isExcludedChartType ?
21987
+ prop.stroke.color : getStrokeColor(service, extraData);
21988
+ }
21989
+ if (
21990
+ !d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED) &&
21991
+ !d3.select(e).classed(CSS_CLASS.DATAPOINTDESELECTED)
21992
+ ) {
21993
+ HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, width, undefined, extraData);
21696
21994
  }
21995
+ HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
21697
21996
  }
21698
- HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, width, undefined, extraData);
21699
- HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
21700
21997
  }
21701
- }
21702
- });
21998
+ });
21999
+ }
21703
22000
  };
21704
22001
 
21705
22002
  Handler.hoverOnBarDuringBigData = function(event, service, point) {
@@ -28073,7 +28370,9 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28073
28370
  "sap/viz/framework/common/util/ObjectUtils",
28074
28371
  "sap/viz/chart/behavior/config/ScreenReaderUtil",
28075
28372
  "sap/viz/chart/components/util/BoundingBoxUtils",
28076
- "sap/viz/chart/components/util/ChartTypeUtils"
28373
+ "sap/viz/chart/components/util/ChartTypeUtils",
28374
+ "sap/viz/chart/behavior/config/HighlightHelper",
28375
+ "sap/viz/framework/common/util/NumberUtils",
28077
28376
  ], function(
28078
28377
  SVG,
28079
28378
  UADetector,
@@ -28093,7 +28392,9 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28093
28392
  ObjectUtils,
28094
28393
  ScreenReaderUtil,
28095
28394
  BoundingBox,
28096
- ChartTypeUtils
28395
+ ChartTypeUtils,
28396
+ HighlightHelper,
28397
+ NumberUtils
28097
28398
  ) {
28098
28399
 
28099
28400
  var THRESHOLD = 0.05;
@@ -28646,55 +28947,259 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28646
28947
  var svgRect = currentNode.getBoundingClientRect(),
28647
28948
  digitalWidth = parseFloat(properties.width) || 1,
28648
28949
  dasharray = digitalWidth + ', ' + digitalWidth;
28649
-
28650
- if(properties.style && properties.style.toLowerCase() === 'solid'){
28651
- dasharray = 'none';
28652
- }
28653
28950
 
28951
+ if(properties.style && properties.style.toLowerCase() === 'solid'){
28952
+ //if properties.style (referenced from focus style class) is solid, no dash array needed
28953
+ dasharray = 'none';
28954
+ }
28955
+
28654
28956
  var boundNode = hoverNode.append("g").attr("class", "v-m-highlight");
28655
28957
  var bound = {
28656
28958
  rect: null,
28657
28959
  line: null,
28658
- polygon: null
28659
- };
28660
- var isStackedChart;
28960
+ polygon: null,
28961
+ path: null
28962
+ };
28963
+ var accSupportedChartType = ["info/bar", "info/dual_bar", "info/column",
28964
+ "info/dual_column", "info/timeseries_column", "info/timeseries_combination",
28965
+ "info/dual_timeseries_combination", "info/timeseries_stacked_column",
28966
+ "info/timeseries_100_stacked_column", "info/timeseries_waterfall",
28967
+ "info/timeseries_stacked_combination", "info/stacked_bar", "info/stacked_column",
28968
+ "info/dual_stacked_bar", "info/dual_stacked_column",
28969
+ "info/100_stacked_bar", "info/100_stacked_column",
28970
+ "info/100_dual_stacked_bar", "info/100_dual_stacked_column",
28971
+ "info/mekko", "info/horizontal_mekko",
28972
+ "info/100_mekko", "info/100_horizontal_mekko",
28973
+ "info/waterfall", "info/horizontal_waterfall",
28974
+ "info/stacked_waterfall", "info/horizontal_stacked_waterfall",
28975
+ "info/heatmap", "info/combination", "info/horizontal_combination",
28976
+ "info/dual_combination", "info/dual_horizontal_combination",
28977
+ "info/stacked_combination", "info/horizontal_stacked_combination",
28978
+ "info/dual_stacked_combination", "info/dual_horizontal_stacked_combination"];
28979
+ var isStackedChart, isAccSupported;
28661
28980
  if (properties.renderType) {
28662
28981
  isStackedChart = properties.renderType.indexOf('stacked') > -1;
28982
+ isAccSupported = accSupportedChartType.indexOf(service._getChartType()) > -1;
28663
28983
  }
28984
+ var strokeStyle = service.getProperties().get("interaction.keyboard.style");
28664
28985
  var angle = properties.angle;
28665
28986
  var isAccEnable = service && service.getProperties().get("interaction.enableAccUpdates");
28666
- properties.width = properties.width ? parseFloat(properties.width.split('px')[0]) : 1;
28667
28987
  if (isStackedChart && properties.isZeroValueInStack && properties.isZeroOnFirstTab) {
28668
28988
  bound.line = boundNode.append('line').attr('class', 'v-highlight-bound')
28669
28989
  .attr("stroke", properties.color)
28670
- .attr("stroke-width", properties.width).attr("stroke-dasharray", dasharray)
28671
- .style("pointer-events", "none" );
28990
+ .attr("stroke-width", properties.width)
28991
+ .attr("stroke-dasharray", dasharray)
28992
+ .style("pointer-events", "none");
28672
28993
  } else {
28673
- if(isAccEnable && selectBound === AXIS_ITEM_NODE_BOUND_ACC){
28674
- var id = "clip-path=" + Math.random().toString(36).slice(2);
28675
- boundNode.append('clipPath')
28676
- .attr("class", CLIPPATH)
28677
- .attr("id", id)
28678
- .append("polygon")
28679
- .attr("points", d3Node.attr("points"));
28680
- bound.polygon = boundNode.append("polygon").attr("class", "v-highlight-bound")
28681
- .attr("points", d3Node.attr("points"))
28994
+ if (isAccEnable) {
28995
+ var cls = d3Node.attr("class") || "";
28996
+ var parentNode = currentNode.parentNode;
28997
+ var parentCls = d3.select(parentNode).attr("class") || "";
28998
+ var isLabel = /^viz-axis-label/.test(cls) ||
28999
+ (currentNode && currentNode.tagName && currentNode.tagName.toLowerCase() === "text");
29000
+ var isDonutDatapoint = /scatter|bubble|pie|donut/.test(properties.renderType) &&
29001
+ selectBound === 'path';
29002
+ var isLegend = parentCls.includes("v-legend-element") ||
29003
+ parentCls.includes("v-legend-item");
29004
+
29005
+ bound.rect = boundNode.append("rect")
29006
+ .attr("class", "v-highlight-bound")
29007
+ .attr("transform", d3Node.attr("transform"))
28682
29008
  .attr("fill", "transparent")
28683
29009
  .attr("fill-opacity", 0)
28684
- .attr("stroke", properties.color)
28685
- .attr("stroke-width", properties.width * 2)
28686
- .attr("stroke-dasharray", dasharray)
28687
29010
  .attr("shape-rendering", "crispEdges")
28688
29011
  .style("pointer-events", "none")
28689
- .attr("clip-path", "url(#" + id + ")");
28690
- }else{
28691
- bound.rect = boundNode.append("rect").attr("class", "v-highlight-bound")
29012
+ .style("outline", "none");
29013
+
29014
+
29015
+ var keyboardStrokeProp = {};
29016
+ var keyProp = service.getProperties().get('interaction.keyboard');
29017
+ for (var index in keyProp) {
29018
+ if (keyProp.hasOwnProperty(index)) {
29019
+ keyboardStrokeProp[index] = keyProp[index];
29020
+ }
29021
+ }
29022
+ if (typeof properties.width === "string") {
29023
+ properties.width = properties.width ? parseFloat(properties.width.split('px')[0]) : 1;
29024
+ } else {
29025
+ properties.width = properties.width ? parseFloat(properties.width) : 1;
29026
+ }
29027
+
29028
+ if (isAccSupported && !isLabel) {
29029
+ bound.rect
29030
+ .attr("x", d3Node.attr("x"))
29031
+ .attr("y", d3Node.attr("y"))
29032
+ .attr("width", d3Node.attr("width"))
29033
+ .attr("height", d3Node.attr("height"))
29034
+ .attr("stroke", "none")
29035
+ .attr("stroke-width", null)
29036
+ .attr("stroke-dasharray", null);
29037
+ if (isLegend) {
29038
+ bound.rect = boundNode.append("rect").attr("class", "v-highlight-bound")
29039
+ .attr("transform", d3Node.attr("transform"))
29040
+ .attr("width", d3Node.attr("width")).attr("height", d3Node.attr("height"))
29041
+ .attr("x", d3Node.attr("x")).attr("y", d3Node.attr("y"))
29042
+ .attr("fill", "transparent").attr("fill-opacity", 0)
29043
+ .attr("stroke", properties.color)
29044
+ .attr("stroke-width", properties.width)
29045
+ .attr(
29046
+ "stroke-dasharray",
29047
+ (strokeStyle && strokeStyle.toLowerCase() === "solid") ?
29048
+ null :
29049
+ (strokeStyle && strokeStyle.toLowerCase() === "dotted") ?
29050
+ (properties.width + "," + properties.width) :
29051
+ dasharray
29052
+ )
29053
+ .attr("shape-rendering", "crispEdges").style("pointer-events", "none");
29054
+ } else {
29055
+ var nodes = document.querySelector('.v-stack');
29056
+ if (!nodes) {
29057
+ return;
29058
+ }
29059
+
29060
+ var gElements = nodes.getElementsByTagName('g');
29061
+ var gArray = Array.prototype.slice.call(gElements);
29062
+
29063
+ var targetG = null;
29064
+ for (var i = 0; i < gArray.length; i++) {
29065
+ var currentG = gArray[i];
29066
+ var tabindex = currentG.getAttribute('tabindex');
29067
+ if (tabindex === '0') {
29068
+ targetG = currentG;
29069
+ break;
29070
+ }
29071
+ }
29072
+ var isStillFocused = targetG &&
29073
+ targetG.getAttribute('tabindex') === '0' &&
29074
+ targetG === document.activeElement;
29075
+ if (!isStillFocused) {
29076
+ return;
29077
+ }
29078
+ keyboardStrokeProp.visible = true;
29079
+ d3.select(targetG).select('.v-m-highlight').remove();
29080
+ HighlightHelper.drawInnerStroke(
29081
+ service, targetG, 'rect', "keyboard", keyboardStrokeProp,
29082
+ undefined,
29083
+ false,
29084
+ undefined
29085
+ );
29086
+
29087
+ }
29088
+ } else if (isDonutDatapoint) {
29089
+ var pieDatapointClippathId = "clip-path=" + Math.random().toString(36).slice(2);
29090
+ boundNode.append('clipPath')
29091
+ .attr("class", CLIPPATH)
29092
+ .attr("id", pieDatapointClippathId)
29093
+ .append("path")
29094
+ .attr("d", d3Node.attr("d"));
29095
+ bound.path = boundNode.append('path')
29096
+ .attr("d", d3Node.attr("d"))
29097
+ .attr("fill", "transparent")
29098
+ .attr("fill-opacity", 0)
29099
+ .attr("stroke", properties.color)
29100
+ .attr("stroke-width", properties.width * 2)
29101
+ .attr("stroke-dasharray", dasharray)
29102
+ .attr("shape-rendering", "crispEdges")
29103
+ .style("pointer-events", "none")
29104
+ .attr("clip-path", "url(#" + pieDatapointClippathId + ")");
29105
+ } else if (!isAccSupported) {
29106
+ bound.rect = boundNode.append("rect").attr("class", "v-highlight-bound")
29107
+ .attr("transform", d3Node.attr("transform"))
29108
+ .attr("width", d3Node.attr("width")).attr("height", d3Node.attr("height"))
29109
+ .attr("x", d3Node.attr("x")).attr("y", d3Node.attr("y"))
29110
+ .attr("fill", "transparent").attr("fill-opacity", 0)
29111
+ .attr("stroke", properties.color)
29112
+ .attr("stroke-width", properties.width)
29113
+ .attr(
29114
+ "stroke-dasharray",
29115
+ (strokeStyle && strokeStyle.toLowerCase() === "solid") ?
29116
+ null :
29117
+ (strokeStyle && strokeStyle.toLowerCase() === "dotted") ?
29118
+ (properties.width + "," + properties.width) :
29119
+ dasharray
29120
+ )
29121
+ .attr("shape-rendering", "crispEdges").style("pointer-events", "none");
29122
+ }
29123
+
29124
+ if (isLabel) {
29125
+ if (selectBound === AXIS_ITEM_NODE_BOUND_ACC) {
29126
+ var id = "clip-path=" + Math.random().toString(36).slice(2);
29127
+ boundNode.append('clipPath')
29128
+ .attr("class", CLIPPATH)
29129
+ .attr("id", id)
29130
+ .append("polygon")
29131
+ .attr("points", d3Node.attr("points"));
29132
+ bound.polygon = boundNode.append("polygon").attr("class", "v-highlight-bound")
29133
+ .attr("points", d3Node.attr("points"))
29134
+ .attr("fill", "transparent")
29135
+ .attr("fill-opacity", 0)
29136
+ .attr("stroke", properties.color)
29137
+ .attr("stroke-width", properties.width * 2)
29138
+ .attr("stroke-dasharray", dasharray)
29139
+ .attr("shape-rendering", "crispEdges")
29140
+ .style("pointer-events", "none")
29141
+ .attr("clip-path", "url(#" + id + ")");
29142
+ } else {
29143
+ var bbox = currentNode.getBBox();
29144
+ var roundedX = Math.round(bbox.x);
29145
+ var roundedY = Math.round(bbox.y);
29146
+ var roundedWidth = Math.round(bbox.width);
29147
+ var roundedHeight = Math.round(bbox.height);
29148
+ var scale = 1;
29149
+ var parentTransform = d3.select(currentNode.parentNode).attr("transform");
29150
+ if (parentTransform && /scale\(([^)]+)\)/.test(parentTransform)) {
29151
+ scale = parseFloat(parentTransform.match(/scale\(([^)]+)\)/)[1]) || 1;
29152
+ }
29153
+
29154
+ var baseDash = 4;
29155
+ var baseGap = 2;
29156
+ var scaledDash = NumberUtils.preciseSimple(baseDash / scale, 1);
29157
+ var scaledGap = NumberUtils.preciseSimple(baseGap / scale, 1);
29158
+
29159
+ bound.rect
29160
+ .attr("x", roundedX)
29161
+ .attr("y", roundedY)
29162
+ .attr("width", roundedWidth)
29163
+ .attr("height", roundedHeight)
29164
+ .attr("stroke", keyboardStrokeProp.color)
29165
+ .attr("stroke-width", keyboardStrokeProp.width || 1)
29166
+ .attr(
29167
+ "stroke-dasharray",
29168
+ (strokeStyle && strokeStyle.toLowerCase() === "solid") ?
29169
+ null :
29170
+ (strokeStyle && strokeStyle.toLowerCase() === "dotted") ?
29171
+ ((keyboardStrokeProp.width || 1) + "," + (keyboardStrokeProp.width || 1)) :
29172
+ (keyboardStrokeProp.dasharray ?
29173
+ keyboardStrokeProp.dasharray :
29174
+ (scaledDash + "," + scaledGap)
29175
+ )
29176
+ )
29177
+ .attr("shape-rendering", "crispsEdges")
29178
+ .attr("class", "v-highlight-bound")
29179
+ .attr("transform", d3Node.attr("transform"))
29180
+ .attr("fill", "transparent")
29181
+ .attr("fill-opacity", 0)
29182
+ .attr("shape-rendering", "crispEdges")
29183
+ .style("pointer-events", "none")
29184
+ .style("outline", "none");
29185
+ }
29186
+ }
29187
+ } else {
29188
+ bound.rect = boundNode.append("rect").attr("class", "v-highlight-bound")
28692
29189
  .attr("transform", d3Node.attr("transform"))
28693
29190
  .attr("width", d3Node.attr("width")).attr("height", d3Node.attr("height"))
28694
29191
  .attr("x", d3Node.attr("x")).attr("y", d3Node.attr("y"))
28695
29192
  .attr("fill", "transparent").attr("fill-opacity", 0)
28696
29193
  .attr("stroke", properties.color)
28697
- .attr("stroke-width", properties.width).attr("stroke-dasharray", dasharray)
29194
+ .attr("stroke-width", properties.width)
29195
+ .attr(
29196
+ "stroke-dasharray",
29197
+ (strokeStyle && strokeStyle.toLowerCase() === "solid") ?
29198
+ null :
29199
+ (strokeStyle && strokeStyle.toLowerCase() === "dotted") ?
29200
+ properties.width + "," + properties.width :
29201
+ dasharray
29202
+ )
28698
29203
  .attr("shape-rendering", "crispEdges").style("pointer-events", "none");
28699
29204
  }
28700
29205
  }
@@ -28775,7 +29280,7 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28775
29280
  x -= strokeWidth;
28776
29281
  y -= strokeWidth;
28777
29282
  width = width ? width + 2 * strokeWidth : 0;
28778
- height = height? height + 2 * strokeWidth : 0;
29283
+ height = height ? height + 2 * strokeWidth : 0;
28779
29284
  }
28780
29285
  if (TypeUtils.isExist(bound.line) || TypeUtils.isExist(bound.rect)) {
28781
29286
  var pos = {
@@ -28818,7 +29323,7 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28818
29323
  .attr("y2", y);
28819
29324
  } else {
28820
29325
  bound.line.attr("x1", x).attr("y1", y).attr("x2", x)
28821
- .attr("y2",y + sizeInfo.height);
29326
+ .attr("y2", y + sizeInfo.height);
28822
29327
  }
28823
29328
  bound.line.attr("transform", "translate(" + transform.a + "," + transform.b + ")");
28824
29329
  if (properties.bCloseCategory || isOverLapInStack(hoverPos, stackPos, properties, ZERO_FOCUS.LINE)) {
@@ -28849,10 +29354,16 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28849
29354
  }
28850
29355
  }
28851
29356
  } else if (!angle || angle % 90 === 0) {
29357
+ if(selectBound === LEGEND_ITEM_BOUND){
29358
+ return;
29359
+ }
29360
+ //feier - DINC0114948: legend focus border too close to chart UI, need more spacing
29361
+ //in case of legend, no need to shift the x position, otherwise focus will touch marker
29362
+ //so exiting out of function
28852
29363
  var parentRect = mainBoundNode.getBoundingClientRect();
28853
29364
  var intersectionBoundRect = BoundingBox.intersection(parentRect, svgRect);
28854
29365
  if (intersectionBoundRect) {
28855
- if(!isAccEnable || (selectBound !== AXIS_ITEM_NODE_BOUND_ACC)){
29366
+ if (!isAccEnable || (selectBound !== AXIS_ITEM_NODE_BOUND_ACC)) {
28856
29367
  bound.rect.attr("width", intersectionBoundRect.width)
28857
29368
  .attr("height", intersectionBoundRect.height);
28858
29369
  /*
@@ -28923,9 +29434,9 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28923
29434
  var clearTabIndexForTabbingOut = function(service){
28924
29435
  var tabindex0 = service._rootNode.selectAll('[tabindex="0"]')[0];
28925
29436
  if(tabindex0.length>1){
28926
- //need to have exactly one element have tabindex 0,
28927
- //otherwise can'tab out of the DOM
28928
- //the element can be axis or legend item, preferably not datapoint
29437
+ //need to have exactly one element have tabindex 0,
29438
+ //otherwise can'tab out of the DOM
29439
+ //the element can be axis or legend item, preferably not datapoint
28929
29440
 
28930
29441
  service._rootNode.selectAll('.v-datapoint[tabindex="0"]').attr("tabindex",null);
28931
29442
  tabindex0 = service._rootNode.selectAll('[tabindex="0"]')[0];
@@ -28940,16 +29451,19 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28940
29451
  return (chartType.indexOf("heatmap") > -1);
28941
29452
  };
28942
29453
 
29454
+ if(isHeatMap(service)){
29455
+ //heat map behaving differently for some reason, needs special handling
29456
+ service._rootNode
29457
+ .selectAll('rect[tabindex="0"]')
29458
+ .attr("tabindex", null);
29459
+ tabindex0 = service._rootNode.selectAll('[tabindex="0"]')[0];
29460
+ }
29461
+
28943
29462
  var legend_indicator = isTreeMap(service) || isHeatMap(service) ? '.v-mbc-legend-item' : '.v-legend-item';
28944
29463
  var legend_node = service._rootNode.select(legend_indicator.concat('[tabindex="0"]')).node();
28945
29464
 
28946
29465
  var not_legend_selector = ":not(" + legend_indicator + ")";
28947
29466
 
28948
- if(isHeatMap(service)){
28949
- //heat map behaving differently for some reason
28950
- return;
28951
- }
28952
-
28953
29467
  if(legend_node){
28954
29468
  service._rootNode
28955
29469
  .selectAll('[tabindex="0"]')
@@ -28960,9 +29474,10 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28960
29474
  .selectAll('[tabindex="0"]')
28961
29475
  .filter(function(d,i){return i<tabindex0.length-1;})
28962
29476
  .attr("tabindex", null);
28963
- }
29477
+ }
28964
29478
 
28965
29479
  }
29480
+
28966
29481
  };
28967
29482
 
28968
29483
 
@@ -29063,6 +29578,11 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
29063
29578
  else {
29064
29579
  boundNode = "rect";
29065
29580
  }
29581
+ if(isAccEnable){
29582
+ if (/pie|donut/.test(renderType)) {
29583
+ boundNode = "path";
29584
+ }
29585
+ }
29066
29586
  hoveredTargetNode = service.getStatus("keyArrowHoveredDataPoint");
29067
29587
  oldHovredTargetId = service.getStatus("hoveredDataPointId");
29068
29588
  if (!hoveredTargetNode) {
@@ -29556,6 +30076,11 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
29556
30076
  } else {
29557
30077
  boundNode = "rect";
29558
30078
  }
30079
+ if(isAccEnable){
30080
+ if (/pie|donut/.test(renderType)) {
30081
+ boundNode = "path";
30082
+ }
30083
+ }
29559
30084
  hoveredDataPointId = service.getStatus("hoveredDataPointId");
29560
30085
  dpGroupNode = service.getNodes(service.NodeType.DATA_POINT_GROUP);
29561
30086
  hoveredTarget = dpGroupNode.node()
@@ -42916,9 +43441,9 @@ define('sap/viz/chart/components/datalabels/DataLabels',[
42916
43441
  if(!color || range === 'outside'){
42917
43442
  //dataLabelColor may need to be calculated.
42918
43443
  //check if dataLabel "covers" dataPoint.
42919
- var outOfDataPoint = this.isDataLabelOutOfDataPoint(item.node, item);
43444
+ outOfDataPoint = this.isDataLabelOutOfDataPoint(item.node, item);
42920
43445
  //backcolor is refercolor or backgroundColor
42921
- var backColor = null;
43446
+ backColor = null;
42922
43447
  if(color && range === 'outside' && !outOfDataPoint){
42923
43448
  // process case then customer set a data label color and set "colorRange" to "outside"
42924
43449
  backColor = referColor|| "#000000";
@@ -47958,12 +48483,14 @@ define('sap/viz/chart/components/renderers/ReferenceLineRenderer',['sap/viz/fram
47958
48483
  'sap/viz/framework/common/util/FiscalUtil',
47959
48484
  'sap/viz/framework/common/util/NameColorUtils',
47960
48485
  "sap/viz/framework/common/util/DataGraphics",
47961
- 'sap/viz/framework/common/util/TimeUtil'
48486
+ 'sap/viz/framework/common/util/TimeUtil',
48487
+ 'sap/viz/framework/common/util/ACCStyleUtils'
47962
48488
  ], function (SVG, TextUtils, Constants, StyleUtils, TypeUtils,
47963
48489
  FiscalUtil,
47964
48490
  NameColorUtils,
47965
48491
  DataGraphics,
47966
- TimeUtil) {
48492
+ TimeUtil,
48493
+ ACCStyleUtils) {
47967
48494
 
47968
48495
  var ReferenceLineRenderer = {};
47969
48496
 
@@ -48114,8 +48641,15 @@ define('sap/viz/chart/components/renderers/ReferenceLineRenderer',['sap/viz/fram
48114
48641
  var config = options.combinedConfig;
48115
48642
  var labelTextGroup = SVG.create("g", options.labelsGroupDOM);
48116
48643
  labelTextGroup.setAttribute("class", "v-referenceline-label v-referenceline-label-" + options.key);
48117
- labelTextGroup.setAttribute("fill",
48118
- config.label.color ? config.label.color : config.axisColor);
48644
+ var fill = config.label.color ? config.label.color : config.axisColor;
48645
+ var textShadow = 'none';
48646
+ if (options.enableAcc) {
48647
+ if (options.color) {
48648
+ fill = ACCStyleUtils.getTextColor(options.color);
48649
+ textShadow = ACCStyleUtils.getTextShadowStyle(options.color);
48650
+ }
48651
+ }
48652
+ labelTextGroup.setAttribute("fill", fill);
48119
48653
  labelTextGroup.setAttribute("font-size", config.label.fontSize);
48120
48654
  labelTextGroup.setAttribute("font-weight", config.label.fontWeight);
48121
48655
  labelTextGroup.setAttribute("font-family", config.label.fontFamily);
@@ -48148,6 +48682,7 @@ define('sap/viz/chart/components/renderers/ReferenceLineRenderer',['sap/viz/fram
48148
48682
  var text = SVG.create("text", labelTextGroup);
48149
48683
  text.textContent = config.label.text;
48150
48684
  text.setAttribute("text-anchor", config.textAnchor);
48685
+ text.setAttribute("style", 'text-shadow: ' + textShadow + ';');
48151
48686
 
48152
48687
  if (!options.isHorizontal) {
48153
48688
  var widthPos = options.pos * options.width;
@@ -48461,6 +48996,8 @@ define('sap/viz/chart/components/renderers/ReferenceLineRenderer',['sap/viz/fram
48461
48996
  labelOptions.height = options.height;
48462
48997
  labelOptions.axisLayout = axisLayout;
48463
48998
  labelOptions.plotInstance = options.plotInstance;
48999
+ labelOptions.color = config.color;
49000
+ labelOptions.enableAcc = options.enableAcc;
48464
49001
 
48465
49002
  var labelObj = this._drawLabel(labelOptions);
48466
49003
  if (labelObj) {
@@ -49273,6 +49810,7 @@ define('sap/viz/chart/components/plots/BasePlot',[
49273
49810
  //reference labels.
49274
49811
  options.plotInstance = this;
49275
49812
  options.clipPath = this.clipPath;
49813
+ options.enableAcc = this._properties.origin.get('interaction.enableAccUpdates') || false;
49276
49814
  referenceLineRenderer.render(options);
49277
49815
  };
49278
49816
 
@@ -49801,33 +50339,32 @@ define('sap/viz/chart/components/plots/BasePlot',[
49801
50339
  config.matchSemantic = true;
49802
50340
  }
49803
50341
 
49804
- var excludeChart = ['info/treemap', 'info/pie', 'info/heatmap', 'info/donut'];
49805
- var isExcludedChartType = false;
49806
- if(excludeChart.indexOf(this._semanticMgr._chartType) >= 0){
49807
- isExcludedChartType = true;
50342
+ if (result.properties.stroke) {
50343
+ config.graphic.stroke = result.properties.stroke;
49808
50344
  }
49809
- var enableAccUpdates = this._properties.origin.get('interaction.enableAccUpdates') || false;
50345
+ if (result.properties.strokeWidth) {
50346
+ config.graphic.strokeWidth = result.properties.strokeWidth;
50347
+ }
50348
+ }
49810
50349
 
49811
- if (enableAccUpdates && !isExcludedChartType) {
49812
- var theme = ACCStyleUtils.getTheme(config.effectManager._template.name);
49813
- if (this._checkColorContrast(config, theme)) {
49814
- if (result.properties.stroke) {
49815
- config.graphic.stroke = result.properties.stroke;
49816
- }
49817
- if (result.properties.strokeWidth) {
49818
- config.graphic.strokeWidth = result.properties.strokeWidth;
49819
- }
49820
- } else {
49821
- config.graphic.stroke = ACCStyleUtils.getBorderColor(result.properties.color);
49822
- config.graphic.strokeWidth = ACCStyleUtils.getBorderWidth();
49823
- }
49824
- } else {
49825
- if (result.properties.stroke) {
49826
- config.graphic.stroke = result.properties.stroke;
49827
- }
49828
- if (result.properties.strokeWidth) {
49829
- config.graphic.strokeWidth = result.properties.strokeWidth;
49830
- }
50350
+ var enableAccUpdates = this._properties.origin.get('interaction.enableAccUpdates') || false;
50351
+ var isExcludedChartType = ACCStyleUtils.isExcludedChartType(this._semanticMgr._chartType);
50352
+ if (enableAccUpdates && !isExcludedChartType) {
50353
+ var vizTheme = config.effectManager._getTemplate() ?
50354
+ config.effectManager._getTemplate().name : null;
50355
+ var theme = ACCStyleUtils.getTheme(vizTheme);
50356
+ if (!this._checkColorContrast(config, theme)) {
50357
+ var resultColor = null;
50358
+ if (result &&
50359
+ result.properties &&
50360
+ result.properties.hasOwnProperty("color")) {
50361
+ resultColor = result.properties.color;
50362
+ }
50363
+ resultColor = resultColor || config.data.color;
50364
+ var accBorder = ACCStyleUtils.getBorderColor(resultColor);
50365
+ var accBorderWidth = ACCStyleUtils.getBorderWidth();
50366
+ config.graphic.stroke = accBorder ? accBorder : config.graphic.stroke;
50367
+ config.graphic.strokeWidth = accBorderWidth ? accBorderWidth : config.graphic.strokeWidth;
49831
50368
  }
49832
50369
  }
49833
50370
 
@@ -53439,23 +53976,78 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForBar',[
53439
53976
  }
53440
53977
  var prop;
53441
53978
  var isMarkerRendererExist = TypeUtils.isExist(props.get('plotArea.markerRenderer'));
53442
- mainNode.forEach(function(e) {
53443
- var width = 1;
53444
- if(gray || bUseRange) {
53445
- prop = props.get('interaction.deselected');
53446
- if (bUseRange) {
53447
- prop = ObjectUtils.extend(true, {}, prop);
53448
- prop.opacity = 1;
53979
+ if (!isAccEnable) {
53980
+ mainNode.forEach(function (e) {
53981
+ var width = 1;
53982
+ if (gray || bUseRange) {
53983
+ prop = props.get('interaction.deselected');
53984
+ if (bUseRange) {
53985
+ prop = ObjectUtils.extend(true, {}, prop);
53986
+ prop.opacity = 1;
53987
+ }
53988
+ } else {
53989
+ prop = props.get('plotArea.dataPoint');
53990
+ width = DataGraphics.getData(e).strokeWidth;
53449
53991
  }
53450
- }else{
53451
- prop = props.get('plotArea.dataPoint');
53452
- width = DataGraphics.getData(e).strokeWidth;
53453
- }
53454
- var extraData = DataGraphics.getData(e);
53455
- HighlightHelper.drawStroke(service, e, 'rect', prop.stroke,
53456
- TypeUtils.isExist(width) ? width : 1, undefined, extraData);
53457
- HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
53458
- });
53992
+ var extraData = DataGraphics.getData(e);
53993
+ HighlightHelper.drawStroke(service, e, 'rect', prop.stroke,
53994
+ TypeUtils.isExist(width) ? width : 1, undefined, extraData);
53995
+ HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
53996
+ });
53997
+ } else {
53998
+ var isClickBlank = Object.keys(event.data).length <= 1;
53999
+ mainNode.forEach(function (e) {
54000
+ var width = 1;
54001
+ if (gray || bUseRange) {
54002
+ prop = props.get('interaction.deselected');
54003
+ if (bUseRange) {
54004
+ var tempProp = {};
54005
+ for (var key in prop) {
54006
+ if (prop.hasOwnProperty(key)) {
54007
+ tempProp[key] = prop[key];
54008
+ }
54009
+ }
54010
+ tempProp.opacity = 1;
54011
+ prop = tempProp;
54012
+ }
54013
+ } else {
54014
+ prop = props.get('plotArea.dataPoint');
54015
+ var data = DataGraphics.getData(e);
54016
+ if (data && data.strokeWidth != null) {
54017
+ width = data.strokeWidth;
54018
+ }
54019
+ }
54020
+
54021
+ var strokeProp = {};
54022
+ for (var i in prop.stroke) {
54023
+ if (prop.stroke.hasOwnProperty(i)) {
54024
+ strokeProp[i] = prop.stroke[i];
54025
+ }
54026
+ }
54027
+ if (isClickBlank) {
54028
+ d3.select(e).classed(CSS_CLASS.DATAPOINTDESELECTED, false);
54029
+
54030
+ HighlightHelper.drawStroke(
54031
+ service, e, 'rect', prop.stroke,
54032
+ DataGraphics.getData(e).strokeWidth || 1, undefined, DataGraphics.getData(e)
54033
+ );
54034
+ HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
54035
+
54036
+ d3.select(e).selectAll('rect')
54037
+ .attr("clip-path", null)
54038
+ .attr("data-inner-stroke-width", null)
54039
+ .attr("stroke-dasharray", null);
54040
+ } else {
54041
+ d3.select(e).classed(CSS_CLASS.DATAPOINTDESELECTED, true);
54042
+ HighlightHelper.drawInnerStroke(
54043
+ service, e, 'rect', "select", strokeProp,
54044
+ DataGraphics.getData(e).strokeWidth, false, DataGraphics.getData(e)
54045
+ );
54046
+ HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
54047
+ }
54048
+ });
54049
+ }
54050
+
53459
54051
  }
53460
54052
  }, {
53461
54053
  "id": "clearPlot_timeseries_column",
@@ -55921,6 +56513,22 @@ define('sap/viz/chart/components/plots/StackedColumnPlot',[
55921
56513
  var isCustom = (cpRenderer !== this._dataPointRenderer && cpRenderer );
55922
56514
  var stackCtx = [], origGraphic, dataPointG;
55923
56515
  var extraData, value;
56516
+ var isAccEnable = this._properties.origin.get("interaction.enableAccUpdates");
56517
+ var segmentGap = 0;
56518
+ if (isAccEnable) {
56519
+ var renderType = (this._options && this._options.renderType) ||
56520
+ (this._properties && this._properties._props &&
56521
+ this._properties._props.renderType &&
56522
+ this._properties._props.renderType.value) || "";
56523
+
56524
+ var isMekkoType = /(^|_)mekko/i.test(renderType);
56525
+
56526
+ if (!isMekkoType && this._properties && this._properties._props &&
56527
+ this._properties._props["plotArea.segmentGap"] &&
56528
+ typeof this._properties._props["plotArea.segmentGap"].value !== "undefined") {
56529
+ segmentGap = +this._properties._props["plotArea.segmentGap"].value || 0;
56530
+ }
56531
+ }
55924
56532
  stackCtx.range = [0, 0];
55925
56533
  if (!updateOnly) {
55926
56534
  categoryG = SVG.create("g");
@@ -55954,8 +56562,20 @@ define('sap/viz/chart/components/plots/StackedColumnPlot',[
55954
56562
  origGraphic = ObjectUtils.extend({}, config.graphic);
55955
56563
  config.graphic.stackWidth = stackWidth;
55956
56564
  config.graphic.stackHeight = stackHeight;
55957
- config.graphic.x = config.horizontal ? position.x - x0 : 0;
55958
- config.graphic.y = config.horizontal ? 0 : position.y - y0;
56565
+ if (segmentGap > 0) {
56566
+ if (config.horizontal) {
56567
+ config.graphic.x = position.x - x0 + segmentGap / 2;
56568
+ config.graphic.width = Math.max(0, config.graphic.width - segmentGap);
56569
+ config.graphic.y = 0;
56570
+ } else {
56571
+ config.graphic.y = position.y - y0 + segmentGap / 2;
56572
+ config.graphic.height = Math.max(0, config.graphic.height - segmentGap);
56573
+ config.graphic.x = 0;
56574
+ }
56575
+ } else {
56576
+ config.graphic.x = config.horizontal ? (position.x - x0) : 0;
56577
+ config.graphic.y = config.horizontal ? 0 : (position.y - y0);
56578
+ }
55959
56579
  var defaultRendered = false;
55960
56580
 
55961
56581
  if (updateOnly) {
@@ -56001,7 +56621,13 @@ define('sap/viz/chart/components/plots/StackedColumnPlot',[
56001
56621
  newDataPoints.push(dataPointG);
56002
56622
  }
56003
56623
 
56004
- dataPointG.setAttribute("transform", 'translate(' + position.x + ', ' + position.y + ')');
56624
+ if (segmentGap > 0) {
56625
+ var tx = position.x + (config.horizontal ? segmentGap / 2 : 0);
56626
+ var ty = position.y + (config.horizontal ? 0 : segmentGap / 2);
56627
+ dataPointG.setAttribute("transform", 'translate(' + tx + ', ' + ty + ')');
56628
+ } else {
56629
+ dataPointG.setAttribute("transform", 'translate(' + position.x + ', ' + position.y + ')');
56630
+ }
56005
56631
  config.graphic = origGraphic;
56006
56632
  if( dataModels && dataModels[i] && !dataModels[i].getData()){
56007
56633
  dataModels[i].init(config, currentIds[i], data[i],
@@ -56046,6 +56672,17 @@ define('sap/viz/chart/components/plots/StackedColumnPlot',[
56046
56672
  delete clonedGraphic.pattern;
56047
56673
  clonedGraphic.fill = "transparent";
56048
56674
  }
56675
+
56676
+ if (segmentGap > 0) {
56677
+ if (config.horizontal) {
56678
+ config.graphic.x += segmentGap / 2;
56679
+ config.graphic.width = Math.max(0, config.graphic.width - segmentGap);
56680
+ } else {
56681
+ config.graphic.y += segmentGap / 2;
56682
+ config.graphic.height = Math.max(0, config.graphic.height - segmentGap);
56683
+ }
56684
+ }
56685
+
56049
56686
  node = cpRenderer(config);
56050
56687
  if (clonedGraphic) {
56051
56688
  shadowNode = cpRenderer({ graphic: clonedGraphic });
@@ -56099,7 +56736,13 @@ define('sap/viz/chart/components/plots/StackedColumnPlot',[
56099
56736
  newDataPoints.push(dataPointG);
56100
56737
 
56101
56738
  }
56102
- dataPointG.setAttribute("transform", 'translate(' + position.x + ', ' + position.y + ')');
56739
+ if (segmentGap > 0) {
56740
+ var tx2 = position.x + (config.horizontal ? segmentGap / 2 : 0);
56741
+ var ty2 = position.y + (config.horizontal ? 0 : segmentGap / 2);
56742
+ dataPointG.setAttribute("transform", 'translate(' + tx2 + ', ' + ty2 + ')');
56743
+ } else {
56744
+ dataPointG.setAttribute("transform", 'translate(' + position.x + ', ' + position.y + ')');
56745
+ }
56103
56746
  if(dataModels && dataModels[i] && !dataModels[i].getData()){
56104
56747
  dataModels[i].init(config, currentIds[i], data[i],
56105
56748
  dataPoints[i].id || Constants.NULL_VALUE, null);
@@ -56886,7 +57529,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56886
57529
  'sap/viz/framework/interaction/Constants',
56887
57530
  'sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',
56888
57531
  "sap/viz/framework/interaction/BehaviorManager"
56889
- ], function(
57532
+ ], function (
56890
57533
  Constants,
56891
57534
  TypeUtils,
56892
57535
  HighlightHelper,
@@ -56901,10 +57544,15 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56901
57544
 
56902
57545
  var timeLineType = ["info/timeseries_line"];
56903
57546
  var timeCombTypes = ["info/timeseries_combination",
56904
- "info/dual_timeseries_combination",
56905
- "info/timeseries_stacked_combination"];
57547
+ "info/dual_timeseries_combination",
57548
+ "info/timeseries_stacked_combination"];
56906
57549
  var TimeLineAndComb = timeLineType.concat(timeCombTypes);
56907
57550
 
57551
+ var barCombTypes = ["info/combination", "info/horizontal_combination",
57552
+ "info/dual_combination", "info/dual_horizontal_combination",
57553
+ "info/stacked_combination", "info/horizontal_stacked_combination",
57554
+ "info/dual_stacked_combination", "info/dual_horizontal_stacked_combination"];
57555
+
56908
57556
  var lineType2 = [
56909
57557
  "info/line", "info/horizontal_line",
56910
57558
  "info/dual_line", "info/dual_horizontal_line",
@@ -56929,7 +57577,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56929
57577
  "name": "selectDataPoint",
56930
57578
  "supportedChartTypes": lineType2,
56931
57579
  },
56932
- "handler": function(event, service) {
57580
+ "handler": function (event, service) {
56933
57581
  if (service.isBigDataMode()) {
56934
57582
  DPBhvrHdlr.selectOnLineDuringBigData(event, service);
56935
57583
  } else {
@@ -56942,7 +57590,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56942
57590
  "name": "deselectDataPoint",
56943
57591
  "supportedChartTypes": lineType2
56944
57592
  },
56945
- "handler": function(event, service) {
57593
+ "handler": function (event, service) {
56946
57594
  if (service.isBigDataMode()) {
56947
57595
  return;
56948
57596
  }
@@ -56952,7 +57600,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56952
57600
  var properties = service.getProperties();
56953
57601
  var lineRenderer;
56954
57602
  var isMarkerRendererExist = TypeUtils.isExist(properties.get('plotArea.markerRenderer'));
56955
- elements.forEach(function(e) {
57603
+ elements.forEach(function (e) {
56956
57604
  DataPointUtils.unhighlight(e);
56957
57605
  lineRenderer = DPBhvrHdlr.getLineRenderer(service, e);
56958
57606
  DPBhvrHdlr.renderLightLine(service, e, false, lineRenderer);
@@ -56979,6 +57627,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56979
57627
  "supportedChartTypes": lineType2
56980
57628
  },
56981
57629
  "handler": function (event, service) {
57630
+ var isBarComb = barCombTypes.indexOf(service._getChartType()) > -1;
56982
57631
  if (service.isBigDataMode() && !service.isTrellis()) {
56983
57632
  DPBhvrHdlr.highlightOnLineDuringBigData(event, service);
56984
57633
  }
@@ -56986,13 +57635,38 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56986
57635
  service.fireEvent(event, true);
56987
57636
  var elements = HighlightHelper.turnToArray(event.data.targets);
56988
57637
  var properties = service.getProperties();
56989
- var prop = properties.get('interaction.hover');
57638
+ var isAccEnable = properties.get("interaction.enableAccUpdates");
57639
+ var prop;
57640
+ if (isAccEnable) {
57641
+ prop = event.data.byKeyboard ?
57642
+ properties.get('interaction.keyboard') || properties.get('interaction.hover') :
57643
+ properties.get('interaction.hover');
57644
+ if (prop && !prop.stroke) {
57645
+ prop = {
57646
+ stroke: {
57647
+ color: prop.color,
57648
+ width: prop.width,
57649
+ visible: true
57650
+ }
57651
+ };
57652
+ }
57653
+ } else {
57654
+ prop = properties.get('interaction.hover');
57655
+ }
56990
57656
  var isMarkerRenderExist = TypeUtils.isExist(properties.get('plotArea.markerRenderer'));
57657
+
56991
57658
  elements.forEach(function (e) {
56992
57659
  var extraData = DataGraphics.getData(e) || {};
56993
57660
  var bSetChildOpacity = !extraData.isZeroValue;
56994
- HighlightHelper.drawStroke(service, e, event.data.byKeyboard ? 'path' : 'path, rect',
56995
- prop.stroke, 2, undefined, extraData);
57661
+ if (isAccEnable && isBarComb) {
57662
+ HighlightHelper.drawInnerStroke(
57663
+ service, e, 'path, rect', event.data.byKeyboard ? "keyboard" : "hover", prop.stroke,
57664
+ DataGraphics.getData(e).strokeWidth, false, DataGraphics.getData(e)
57665
+ );
57666
+ } else {
57667
+ HighlightHelper.drawStroke(service, e, event.data.byKeyboard ? 'path' : 'path, rect',
57668
+ prop.stroke, 2, undefined, extraData);
57669
+ }
56996
57670
  HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
56997
57671
  });
56998
57672
  }
@@ -57007,11 +57681,13 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57007
57681
  if (service.isBigDataMode() && !service.isTrellis()) {
57008
57682
  DPBhvrHdlr.unhighlightOnLineDuringBigData(event, service);
57009
57683
  } else {
57684
+ var isBarComb = barCombTypes.indexOf(service._getChartType()) > -1;
57010
57685
  service.fireEvent(event, true);
57011
57686
  var elements = HighlightHelper.turnToArray(event.data.targets);
57012
57687
  var props = service.getProperties();
57013
57688
  var prop;
57014
57689
  var isMarkerRenderExist = TypeUtils.isExist(props.get('plotArea.markerRenderer'));
57690
+ var isAccEnable = props.get("interaction.enableAccUpdates");
57015
57691
  elements.forEach(function (e) {
57016
57692
  var visible;
57017
57693
  var width = 1;
@@ -57031,7 +57707,20 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57031
57707
  visible = false;
57032
57708
  }
57033
57709
  var bSetChildOpacity = !extraData.isZeroValue;
57034
- HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width);
57710
+ if (isAccEnable && isBarComb) {
57711
+ HighlightHelper.drawInnerStroke(
57712
+ service,
57713
+ e,
57714
+ 'path, rect',
57715
+ event.data.byKeyboard ? "keyboard" : "hover",
57716
+ prop,
57717
+ extraData.strokeWidth,
57718
+ false,
57719
+ extraData
57720
+ );
57721
+ } else {
57722
+ HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width);
57723
+ }
57035
57724
  HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
57036
57725
  if (!visible) {
57037
57726
  setMakerOpacity(service, e);
@@ -57045,7 +57734,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57045
57734
  "name": "clearPlot",
57046
57735
  "supportedChartTypes": lineType2
57047
57736
  },
57048
- "handler": function(event, service) {
57737
+ "handler": function (event, service) {
57049
57738
  service.fireEvent(event, true);
57050
57739
  service._getDecorationLayer().clear();
57051
57740
 
@@ -57061,8 +57750,10 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57061
57750
  if (!mainNode || !mainNode.length) {
57062
57751
  return;
57063
57752
  }
57753
+
57754
+ var isClickBlank = Object.keys(event.data).length <= 1;
57064
57755
  var isMarkerRenderExist = TypeUtils.isExist(properties.get('plotArea.markerRenderer'));
57065
- mainNode.forEach(function(e) {
57756
+ mainNode.forEach(function (e) {
57066
57757
  var width = 1;
57067
57758
  var extraData = DataGraphics.getData(e) || {};
57068
57759
  if (gray || bUseRange) {
@@ -57078,19 +57769,34 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57078
57769
  }
57079
57770
  }
57080
57771
  var bSetChildOpacity = !extraData.isZeroValue;
57081
- HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width, undefined, extraData);
57082
- HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
57772
+
57773
+ if (isClickBlank) {
57774
+ HighlightHelper.drawInnerStroke(
57775
+ service, e, 'path, rect', "deselect",
57776
+ prop, width, undefined, extraData
57777
+ );
57778
+
57779
+ HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
57780
+
57781
+ d3.select(e).selectAll('rect, path')
57782
+ .attr("clip-path", null)
57783
+ .attr("stroke-width", width)
57784
+ .attr("stroke-dasharray", null);
57785
+ } else {
57786
+ HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width, undefined, extraData);
57787
+ HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
57788
+ }
57083
57789
  setMakerOpacity(service, e);
57084
57790
  });
57085
57791
  }
57086
- },{
57792
+ }, {
57087
57793
  "id": "hover_range_selection_line",
57088
57794
  "triggerEvent": {
57089
57795
  "name": "hover",
57090
57796
  "supportedChartTypes": TimeLineAndComb,
57091
57797
  "targets": "v-m-action-layerrange"
57092
57798
  },
57093
- "handler": function(event, service) {
57799
+ "handler": function (event, service) {
57094
57800
  DPBhvrHdlr.showDetailForRangeSelectionWhenHover(event, service);
57095
57801
  }
57096
57802
  }, {
@@ -57100,7 +57806,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57100
57806
  "supportedChartTypes": timeLineType,
57101
57807
  "targets": "v-m-plot"
57102
57808
  },
57103
- "handler": function(event, service) {
57809
+ "handler": function (event, service) {
57104
57810
  DPBhvrHdlr.hoverOnLineDuringBigData(event, service);
57105
57811
  }
57106
57812
  }, {
@@ -57110,7 +57816,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57110
57816
  "supportedChartTypes": timeLineType,
57111
57817
  "excludeTargets": ["v-m-plot", Constants.CSS.CLASS.DATAPOINTS_MODULE]
57112
57818
  },
57113
- "handler": function(event, service) {
57819
+ "handler": function (event, service) {
57114
57820
  if (service.getStatus("rangeSelection")) {
57115
57821
  return;
57116
57822
  }
@@ -57127,7 +57833,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57127
57833
  "supportedChartTypes": timeLineType,
57128
57834
  "excludeTargets": [CSS_CLASS.DATAPOINT, CSS_CLASS.DATALABEL]
57129
57835
  },
57130
- "handler": function(event, service) {
57836
+ "handler": function (event, service) {
57131
57837
  if (service.isBigDataMode() || service.getStatus("rangeSelection")) {
57132
57838
  return;
57133
57839
  }
@@ -57140,19 +57846,18 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57140
57846
  "supportedChartTypes": lineType,
57141
57847
  "excludeTargets": HighlightHelper.getDeselAllExTargets(),
57142
57848
  },
57143
- "handler": function(event, service) {
57849
+ "handler": function (event, service) {
57144
57850
 
57145
- if(!service.getProperties().get("interaction.enableDeselectAll")){
57851
+ if (!service.getProperties().get("interaction.enableDeselectAll")) {
57146
57852
  return;
57147
57853
  }
57148
- // For time combination chart in big data mode, we process in "click_on_time_comb_during_big_data" already
57149
- if (service.isBigDataMode() && timeCombTypes.indexOf(service._getChartType()) > -1 ) {
57854
+ if (service.isBigDataMode() && timeCombTypes.indexOf(service._getChartType()) > -1) {
57150
57855
  return;
57151
57856
  }
57152
57857
 
57153
- if(TimeLineAndComb.indexOf(service._getChartType()) > -1){
57858
+ if (TimeLineAndComb.indexOf(service._getChartType()) > -1) {
57154
57859
  DPBhvrHdlr.clickOnLineDuringBigData(event, service);
57155
- }else{
57860
+ } else {
57156
57861
  service.fireEvent(event, true);
57157
57862
  }
57158
57863
 
@@ -57163,7 +57868,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57163
57868
  "name": "clearPlot",
57164
57869
  "supportedChartTypes": TimeLineAndComb
57165
57870
  },
57166
- "handler": function(event, service) {
57871
+ "handler": function (event, service) {
57167
57872
  service.fireEvent(event, true);
57168
57873
  if (!event.data.rangeSelection) {
57169
57874
  service._getDecorationLayer().clear();
@@ -57177,7 +57882,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57177
57882
  "name": "down",
57178
57883
  "supportedChartTypes": TimeLineAndComb
57179
57884
  },
57180
- "handler": function(event, service) {
57885
+ "handler": function (event, service) {
57181
57886
  DPBhvrHdlr.updateRangeEffect(event, service);
57182
57887
  }
57183
57888
  }, {
@@ -57187,7 +57892,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57187
57892
  "name": "up",
57188
57893
  "supportedChartTypes": TimeLineAndComb
57189
57894
  },
57190
- "handler": function(event, service) {
57895
+ "handler": function (event, service) {
57191
57896
  DPBhvrHdlr.recoverRangeEffect(event, service);
57192
57897
  }
57193
57898
  }];
@@ -76858,6 +77563,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76858
77563
 
76859
77564
  var elements = HighlightHelper.turnToArray(event.data.targets);
76860
77565
  var propMgr = service.getProperties();
77566
+ var isAccEnable = propMgr.get('interaction.enableAccUpdates');
76861
77567
  var prop = propMgr.get('interaction.hover');
76862
77568
  var hoverPaddingWidth = 2;
76863
77569
  var hoverBorderWidth = parseFloat(HighlightHelper.getWidth(prop.stroke.width, 2));
@@ -76867,6 +77573,10 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76867
77573
 
76868
77574
  if ((d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED) && !DataGraphics.getData(e).isZeroValue) ||
76869
77575
  !prop.stroke.visible || hoverBorderWidth === 0) {
77576
+ if(isAccEnable) {
77577
+ e.firstChild.setAttribute('stroke', 'none');
77578
+ e.firstChild.setAttribute("stroke-width", null);
77579
+ }
76870
77580
  return;
76871
77581
  }
76872
77582
 
@@ -76920,6 +77630,10 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76920
77630
  newline.setAttribute("stroke-width", parseFloat(prop.stroke.width) / 2 + "px");
76921
77631
  newline.setAttribute("stroke-dasharray", dasharray);
76922
77632
  zeroValueHoverNode.appendChild(newline);
77633
+ if(isAccEnable) {
77634
+ e.firstChild.setAttribute('stroke', 'none');
77635
+ e.firstChild.setAttribute("stroke-width", null);
77636
+ }
76923
77637
  e.parentNode.appendChild(zeroValueHoverNode);
76924
77638
  } else {
76925
77639
  var newPath = SVG.create("path");
@@ -76939,6 +77653,10 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76939
77653
  startAngle(startAngle + extraRadius).endAngle(endAngle - extraRadius)();
76940
77654
  }
76941
77655
  newPath.setAttribute("d", pathD);
77656
+ if(isAccEnable) {
77657
+ e.firstChild.setAttribute('stroke', 'none');
77658
+ e.firstChild.setAttribute("stroke-width", null);
77659
+ }
76942
77660
  e.appendChild(newPath);
76943
77661
  }
76944
77662
  });
@@ -76967,6 +77685,8 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76967
77685
  d3.select(parentNode).selectAll('.' + CSS_CLASS.ZEROVALUEHOVER).remove();
76968
77686
  var elements = HighlightHelper.turnToArray(event.data.targets);
76969
77687
  var prop;
77688
+ var propMgr = service.getProperties();
77689
+ var isAccEnable = propMgr.get('interaction.enableAccUpdates');
76970
77690
  elements.forEach(function(e) {
76971
77691
  d3.select(e).selectAll("." + CSS_CLASS.PIE_HOVER_STROKE).remove();
76972
77692
 
@@ -76980,6 +77700,10 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76980
77700
  prop = service.getProperties().get('plotArea.dataPoint');
76981
77701
  }
76982
77702
  }
77703
+ if(isAccEnable && prop.stroke.visible) {
77704
+ e.firstChild.setAttribute('stroke', prop.stroke.color);
77705
+ e.firstChild.setAttribute("stroke-width", prop.stroke.width || 1);
77706
+ }
76983
77707
  HighlightHelper.drawStroke(service, e, 'path', prop.stroke, 1);
76984
77708
  HighlightHelper.drawFill(service, e, 'path', prop,
76985
77709
  TypeUtils.isExist(service.getProperties().get('plotArea.markerRenderer')));
@@ -77316,18 +78040,16 @@ define('sap/viz/chart/components/renderers/TreeMapDimensionLabelRenderer',["sap/
77316
78040
  color = props.dimensionLabel.style.color;
77317
78041
  } else {
77318
78042
  if (config.isLeafItem) {
78043
+ var accFontColor = ACCStyleUtils.getTextColor(bgColor);
78044
+ var fontColor = ColorUtil.getDataLabelColor(bgColor);
77319
78045
  if (props.dataLabel.visible && props.dataLabel.style.color) {
77320
78046
  if(props.dataLabel.style.colorRange === 'outside'){
77321
- color = enableAcc ? ACCStyleUtils.getTextColor(bgColor)
77322
- :
77323
- ColorUtil.getDataLabelColor(bgColor);
78047
+ color = enableAcc ? accFontColor || fontColor : fontColor;
77324
78048
  }else{
77325
78049
  color = props.dataLabel.style.color;
77326
78050
  }
77327
78051
  } else {
77328
- color = enableAcc ? ACCStyleUtils.getTextColor(bgColor)
77329
- :
77330
- ColorUtil.getDataLabelColor(bgColor);
78052
+ color = enableAcc ? accFontColor || fontColor : fontColor;
77331
78053
  }
77332
78054
  } else {
77333
78055
  color = textColor(config);
@@ -77355,7 +78077,7 @@ define('sap/viz/chart/components/renderers/TreeMapDimensionLabelRenderer',["sap/
77355
78077
  label.setAttribute("font-family", labelStyle.fontFamily);
77356
78078
  label.setAttribute('fill-opacity', 1);
77357
78079
  label.setAttribute('aria-hidden','true');
77358
- if (config.enableAcc) {
78080
+ if (config.enableAcc && textShadow) {
77359
78081
  label.setAttribute('style', "text-shadow:" + textShadow + ";");
77360
78082
  }
77361
78083
  label.value = config.data.label;
@@ -81873,7 +82595,8 @@ define('sap/viz/chart/components/plots/HeatMapPlot',[
81873
82595
  var textShadow = null;
81874
82596
  if (enableAccUpdates) {
81875
82597
  var referColor = context.referColor || context.background;
81876
- fontColor = ACCStyleUtils.getTextColor(referColor);
82598
+ var accFontColor = ACCStyleUtils.getTextColor(referColor);
82599
+ fontColor = accFontColor? accFontColor : fontColor;
81877
82600
  textShadow = ACCStyleUtils.getTextShadowStyle(referColor);
81878
82601
  }
81879
82602
 
@@ -81929,6 +82652,7 @@ define('sap/viz/chart/components/plots/HeatMapPlot',[
81929
82652
  }
81930
82653
  }
81931
82654
 
82655
+
81932
82656
  var selection = d3.select(textNode)
81933
82657
  .attr("font-size", fontSize)
81934
82658
  .attr("font-weight", fontWeight)