@sapui5/sap.viz 1.141.2 → 1.143.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);
@@ -18556,16 +18663,85 @@ define('sap/viz/chart/behavior/config/HighlightHelper',[
18556
18663
  return null;
18557
18664
  }
18558
18665
 
18666
+ function setRectCache(e, rectCache) {
18667
+ var dataId = DataPointUtils.getDataPointId(e);
18668
+ if (!rectCache[dataId]) {
18669
+ rectCache[dataId] = e.innerHTML;
18670
+ }
18671
+ }
18672
+ function getRectCache(e, rectCache) {
18673
+ var dataId = DataPointUtils.getDataPointId(e);
18674
+ return rectCache[dataId];
18675
+ }
18676
+ function resetRectCache(rectCache) {
18677
+ for (var key in rectCache) {
18678
+ if (rectCache.hasOwnProperty(key)) {
18679
+ delete rectCache[key];
18680
+ }
18681
+ }
18682
+ }
18683
+
18684
+ function mergeRectContent(e, rectCache) {
18685
+ var currentRectHTML = e.innerHTML;
18686
+ var cachedRectHTML = getRectCache(e, rectCache);
18687
+ var mergedHTML = mergeHTMLContent(cachedRectHTML, currentRectHTML);
18688
+ e.innerHTML = mergedHTML;
18689
+ }
18690
+
18691
+ function mergeHTMLContent(cachedHTML, currentHTML) {
18692
+ if (!cachedHTML) {
18693
+ return currentHTML;
18694
+ }
18695
+ var tempDiv = document.createElement('div');
18696
+ tempDiv.innerHTML = cachedHTML;
18697
+
18698
+ var currentDiv = document.createElement('div');
18699
+ currentDiv.innerHTML = currentHTML;
18700
+
18701
+ var cachedRect = tempDiv.querySelector('rect');
18702
+ var currentRect = currentDiv.querySelector('rect');
18703
+
18704
+ if (cachedRect && currentRect) {
18705
+ var mergedRect = cachedRect.cloneNode(true);
18706
+ var styleAttributes = ['stroke', 'stroke-width', 'fill', 'fill-opacity', 'stroke-opacity', 'opacity'];
18707
+ styleAttributes.forEach(function (attr) {
18708
+ if (currentRect.hasAttribute(attr)) {
18709
+ mergedRect.setAttribute(attr, currentRect.getAttribute(attr));
18710
+ }
18711
+ });
18712
+ tempDiv.replaceChild(mergedRect, cachedRect);
18713
+ }
18714
+ var cachedG = tempDiv.querySelector('g');
18715
+ var currentG = currentDiv.querySelector('g');
18716
+
18717
+ if (cachedG && currentG) {
18718
+ var mergedG = cachedG.cloneNode(true);
18719
+ var gStyleAttributes = ['fill-opacity'];
18720
+ gStyleAttributes.forEach(function (attr) {
18721
+ if (currentG.hasAttribute(attr)) {
18722
+ mergedG.setAttribute(attr, currentG.getAttribute(attr));
18723
+ }
18724
+ });
18725
+ tempDiv.replaceChild(mergedG, cachedG);
18726
+ }
18727
+ return tempDiv.innerHTML;
18728
+ }
18729
+
18559
18730
  var helper = {
18560
18731
  transformColor: transformColor,
18561
18732
  turnToArray: turnToArray,
18562
18733
  getColors : getColors,
18563
18734
  drawStroke : drawStroke,
18735
+ drawInnerStroke : drawInnerStroke,
18564
18736
  drawFill : drawFill,
18565
18737
  getWidth : getWidth,
18566
18738
  getDeselAllExTargets: getDeselAllExTargets,
18567
18739
  getLayerCoord: getLayerCoord,
18568
- tryToFindNode: tryToFindNode
18740
+ tryToFindNode: tryToFindNode,
18741
+ setRectCache: setRectCache,
18742
+ getRectCache: getRectCache,
18743
+ resetRectCache: resetRectCache,
18744
+ mergeRectContent: mergeRectContent,
18569
18745
  };
18570
18746
 
18571
18747
  return helper;
@@ -20592,6 +20768,48 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
20592
20768
 
20593
20769
  var getColors = HighlightHelper.getColors;
20594
20770
 
20771
+ var rectCache = {};
20772
+
20773
+ function checkColorContrast(fill, bgcolor, threshold) {
20774
+ if (fill && bgcolor) {
20775
+ var ratioObj = ColorUtil.checkColorContrast(bgcolor, fill, threshold);
20776
+ if (!ratioObj.meetsThreshold) {
20777
+ var stroke = ACCStyleUtils.getBorderColor(fill);
20778
+ return stroke;
20779
+ }
20780
+ }
20781
+ return null;
20782
+ }
20783
+ function hasPropCustomizeValue(propsMgr, propName) {
20784
+ return propsMgr._props[propName].hasOwnProperty('customizeValue');
20785
+ }
20786
+ function hasPropValue(propsMgr, propName) {
20787
+ return propsMgr._props[propName].hasOwnProperty('value');
20788
+ }
20789
+
20790
+ function getStrokeColor(service, extraData) {
20791
+ var propMgr = service.getProperties();
20792
+ var strokeColor = "plotArea.dataPoint.stroke.color";
20793
+ var strokeVisible = "plotArea.dataPoint.stroke.visible";
20794
+
20795
+ if(hasPropCustomizeValue(propMgr, strokeColor) || hasPropValue(propMgr, strokeColor)) {
20796
+ return propMgr.get(strokeColor);
20797
+ }
20798
+ var BGCOLORPROPS = ["plotArea.grid.background.color",
20799
+ "plotArea.background.color",
20800
+ "general.background.color"];
20801
+ var textVisible = propMgr.get('plotArea.dataLabel.visible');
20802
+ var template = service.getEffectManager()._getTemplate().name;
20803
+ var theme = ACCStyleUtils.getTheme(template);
20804
+ var chartType = service._getChartType();
20805
+ var threshold = ACCStyleUtils.getThreshold(theme, chartType, textVisible);
20806
+ var bgcolor = ColorUtil.getBgColor(propMgr,
20807
+ propMgr.get(strokeVisible) ? BGCOLORPROPS.concat(strokeColor) : BGCOLORPROPS);
20808
+
20809
+ var stroke = checkColorContrast(extraData.color, bgcolor, threshold);
20810
+ return stroke? stroke : propMgr.get(strokeColor);
20811
+ }
20812
+
20595
20813
  function getShape(plot, dataPoint){
20596
20814
  return plot && plot.getDataPointShape && plot.getDataPointShape(dataPoint);
20597
20815
  }
@@ -21272,13 +21490,21 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
21272
21490
  var prop = properties.get('interaction.selected');
21273
21491
  var isMarkerRenderExist = TypeUtils.isExist(properties.get('plotArea.markerRenderer'));
21274
21492
  var lineRenderer;
21493
+ var isAccEnable = properties.get("interaction.enableAccUpdates");
21275
21494
  elements.forEach(function(e) {
21276
21495
  var extraData = DataGraphics.getData(e);
21277
21496
  var bSetChildOpacity = !extraData.isZeroValue;
21278
21497
  DataPointUtils.highlight(e);
21279
21498
  lineRenderer = Handler.getLineRenderer(service, e);
21280
21499
  Handler.renderLightLine(service, e, true, lineRenderer);
21281
- HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, 1, undefined, extraData);
21500
+ if (isAccEnable) {
21501
+ HighlightHelper.drawInnerStroke(
21502
+ service, e, 'rect, path', 'select', prop.stroke,
21503
+ DataGraphics.getData(e).strokeWidth, false, DataGraphics.getData(e)
21504
+ );
21505
+ } else {
21506
+ HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, 1, undefined, extraData);
21507
+ }
21282
21508
  HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
21283
21509
  });
21284
21510
  };
@@ -21318,21 +21544,46 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
21318
21544
  };
21319
21545
 
21320
21546
  Handler.selectOnBarOnNormalMode = function(event, service){
21547
+ var isAccEnable = service.getProperties().get("interaction.enableAccUpdates");
21321
21548
  var elements = HighlightHelper.turnToArray(event.data.targets);
21322
21549
  var properties = service.getProperties();
21323
21550
  service._getDecorationLayer().clear();
21324
21551
  service.fireEvent(event, true);
21325
21552
  var prop = properties.get('interaction.selected');
21326
21553
  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
- });
21554
+ if (!isAccEnable) {
21555
+ elements.forEach(function (e) {
21556
+ var extraData = DataGraphics.getData(e);
21557
+ var tag = "rect";
21558
+ if (extraData.pattern === "noFill") {
21559
+ tag = "rect, path";
21560
+ }
21561
+ HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, 1, undefined, extraData);
21562
+ HighlightHelper.drawFill(service, e, tag, prop, isMarkerRendererExist);
21563
+ });
21564
+ } else {
21565
+ elements.forEach(function (e) {
21566
+ var extraData = DataGraphics.getData(e);
21567
+ var tag = extraData.pattern === "noFill" ? "rect, path" : "rect";
21568
+
21569
+
21570
+ var strokeProp = {};
21571
+ for (var key in prop.stroke) {
21572
+ if (prop.stroke.hasOwnProperty(key)) {
21573
+ strokeProp[key] = prop.stroke[key];
21574
+ }
21575
+ }
21576
+ strokeProp.isSelect = true;
21577
+
21578
+ HighlightHelper.drawInnerStroke(
21579
+ service, e, 'rect', "select", strokeProp,
21580
+ extraData.strokeWidth, false, extraData
21581
+ );
21582
+
21583
+
21584
+ HighlightHelper.drawFill(service, e, tag, prop, isMarkerRendererExist);
21585
+ });
21586
+ }
21336
21587
  };
21337
21588
 
21338
21589
  Handler.highlightOnCombDuringBigData = function (event, service) {
@@ -21589,6 +21840,7 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
21589
21840
 
21590
21841
  var plot = service.getModule("main.plot");
21591
21842
  var dataModel = service.getDataModel();
21843
+ var isAccEnable = service.getProperties().get("interaction.enableAccUpdates");
21592
21844
 
21593
21845
  elements.forEach(function (e) {
21594
21846
  if(service.isTrellis()){
@@ -21598,15 +21850,49 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
21598
21850
  }else{
21599
21851
  var dataId = DataPointUtils.getDataPointId(e);
21600
21852
  var dataPoint = dataModel.getDataPoint(dataId);
21853
+ HighlightHelper.setRectCache(e, rectCache);
21601
21854
  if (dataPoint) {
21602
21855
  var shape = getShape(plot, dataPoint);
21603
21856
  if(shape === "line"){
21604
21857
  HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, 2);
21605
21858
  HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRendererExist, true);
21606
21859
  } else {
21607
- if (!event.data.byKeyboard) {
21608
- var extraData = DataGraphics.getData(e);
21609
- HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, 2, undefined, extraData);
21860
+ if (isAccEnable) {
21861
+ if (!event.data.byKeyboard) {
21862
+ var strokeProp = {};
21863
+ for (var key in prop.stroke) {
21864
+ if (prop.stroke.hasOwnProperty(key)) {
21865
+ strokeProp[key] = prop.stroke[key];
21866
+ }
21867
+ }
21868
+ strokeProp.isHover = true;
21869
+
21870
+ HighlightHelper.drawInnerStroke(
21871
+ service, e, 'rect', "hover", strokeProp,
21872
+ DataGraphics.getData(e).strokeWidth, false, DataGraphics.getData(e)
21873
+ );
21874
+ } else {
21875
+ var keyboardStrokeProp = {};
21876
+ var keyProp = props.get('interaction.keyboard');
21877
+ for (var i in keyProp) {
21878
+ if (keyProp.hasOwnProperty(i)) {
21879
+ keyboardStrokeProp[i] = keyProp[i];
21880
+ }
21881
+ }
21882
+ keyboardStrokeProp.visible = true;
21883
+ d3.select(e).select('.v-m-highlight').remove();
21884
+ HighlightHelper.drawInnerStroke(
21885
+ service, e, 'rect', "keyboard", keyboardStrokeProp,
21886
+ undefined,
21887
+ false,
21888
+ undefined
21889
+ );
21890
+ }
21891
+ } else {
21892
+ if (!event.data.byKeyboard) {
21893
+ var extraData = DataGraphics.getData(e);
21894
+ HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, 2, undefined, extraData);
21895
+ }
21610
21896
  }
21611
21897
  HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
21612
21898
  }
@@ -21639,67 +21925,154 @@ define('sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',[
21639
21925
  var plot = service.getModule("main.plot");
21640
21926
  var dataModel = service.getDataModel();
21641
21927
  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);
21928
+ if (!isAccEnable) {
21929
+ elements.forEach(function (e) {
21930
+ var dataId = DataPointUtils.getDataPointId(e);
21931
+ var dataPoint = dataModel.getDataPoint(dataId);
21932
+ if (dataPoint) {
21933
+ var shape = getShape(plot, dataPoint);
21647
21934
 
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');
21935
+ var visible;
21936
+ var width = 1;
21937
+ var extraData;
21938
+ if (d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED)) {
21939
+ prop = props.get('interaction.selected');
21940
+ visible = true;
21657
21941
  } else {
21658
- prop = props.get('plotArea.dataPoint');
21659
- extraData = DataGraphics.getData(e);
21660
- if (extraData) {
21661
- width = extraData.strokeWidth;
21942
+ if (service.shouldUseDeselectedColor()) {
21943
+ prop = props.get('interaction.deselected');
21944
+ } else {
21945
+ prop = props.get('plotArea.dataPoint');
21946
+ extraData = DataGraphics.getData(e);
21947
+ if (extraData) {
21948
+ width = extraData.strokeWidth;
21949
+ }
21950
+ }
21951
+ visible = false;
21952
+ }
21953
+
21954
+ if (shape === "line") {
21955
+ HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width);
21956
+ HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRendererExist, true);
21957
+ if (!visible) {
21958
+ setMakerOpacity(service, e);
21662
21959
  }
21960
+ } else {
21961
+ extraData = DataGraphics.getData(e);
21962
+ HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, width, undefined, extraData);
21963
+ HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
21663
21964
  }
21664
- visible = false;
21665
21965
  }
21966
+ });
21967
+ } else {
21968
+ elements = elements.filter(function (e) {
21969
+ var dataId = DataPointUtils.getDataPointId(e);
21970
+ return dataModel.getDataPoint(dataId) !== undefined;
21971
+ });
21972
+ elements.forEach(function (e) {
21973
+ var dataId = DataPointUtils.getDataPointId(e);
21974
+ var dataPoint = dataModel.getDataPoint(dataId);
21975
+ if (dataPoint) {
21976
+ var shape = getShape(plot, dataPoint);
21666
21977
 
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);
21978
+ var visible;
21979
+ var width = 1;
21980
+ var extraData;
21981
+
21982
+ if (d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED)) {
21983
+ prop = props.get('interaction.selected');
21984
+ visible = true;
21985
+ var strokeProp = {};
21986
+ for (var key in prop.stroke) {
21987
+ if (prop.stroke.hasOwnProperty(key)) {
21988
+ strokeProp[key] = prop.stroke[key];
21989
+ }
21990
+ }
21991
+ strokeProp.isHover = false;
21992
+ HighlightHelper.drawInnerStroke(
21993
+ service,
21994
+ e,
21995
+ 'rect',
21996
+ "select",
21997
+ strokeProp,
21998
+ extraData ? extraData.strokeWidth : 1,
21999
+ true,
22000
+ extraData
22001
+ );
22002
+ } else {
22003
+ if (service.shouldUseDeselectedColor()) {
22004
+ prop = props.get('interaction.deselected');
22005
+ } else {
22006
+ prop = props.get('plotArea.dataPoint');
22007
+ extraData = DataGraphics.getData(e);
22008
+ if (extraData) {
22009
+ width = extraData.strokeWidth;
22010
+ }
22011
+ }
22012
+ visible = false;
21672
22013
  }
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;
22014
+
22015
+ if (shape === "line") {
22016
+ HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width);
22017
+ HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRendererExist, true);
22018
+ if (!visible) {
22019
+ setMakerOpacity(service, e);
22020
+ }
22021
+ } else {
22022
+ extraData = DataGraphics.getData(e);
22023
+ if (!d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED)) {
22024
+ var strokeProperty = {};
22025
+ for (var k in prop.stroke) {
22026
+ if (prop.stroke.hasOwnProperty(k)) {
22027
+ strokeProperty[k] = prop.stroke[k];
22028
+ }
21695
22029
  }
22030
+ strokeProperty.visible = false;
22031
+ strokeProperty.isHover = true;
22032
+
22033
+ HighlightHelper.drawInnerStroke(
22034
+ service,
22035
+ e,
22036
+ 'rect',
22037
+ "hover",
22038
+ strokeProperty,
22039
+ extraData.strokeWidth,
22040
+ true,
22041
+ extraData
22042
+ );
22043
+ if (d3.select(e).classed(CSS_CLASS.DATAPOINTDESELECTED)) {
22044
+ var deselectProp = service.getProperties().get('interaction.deselected');
22045
+ HighlightHelper.drawInnerStroke(
22046
+ service,
22047
+ e,
22048
+ 'rect',
22049
+ 'deselect',
22050
+ deselectProp.stroke,
22051
+ (extraData && extraData.strokeWidth) || 1,
22052
+ true,
22053
+ extraData || {}
22054
+ );
22055
+ }
22056
+ var isExcludedChartType = ACCStyleUtils.isExcludedChartType(service._getChartType());
22057
+ prop.stroke.color = isExcludedChartType ?
22058
+ prop.stroke.color : getStrokeColor(service, extraData);
22059
+ }
22060
+ if (
22061
+ !d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED) &&
22062
+ !d3.select(e).classed(CSS_CLASS.DATAPOINTDESELECTED)
22063
+ ) {
22064
+ HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, width, undefined, extraData);
22065
+ }
22066
+ HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
22067
+ var hasInnerStroke = ACCStyleUtils.isTreeMapOrHeatMap(service._getChartType());
22068
+ if (hasInnerStroke) {
22069
+ HighlightHelper.mergeRectContent(e, rectCache);
21696
22070
  }
21697
22071
  }
21698
- HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, width, undefined, extraData);
21699
- HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
21700
22072
  }
21701
- }
21702
- });
22073
+ });
22074
+ HighlightHelper.resetRectCache(rectCache);
22075
+ }
21703
22076
  };
21704
22077
 
21705
22078
  Handler.hoverOnBarDuringBigData = function(event, service, point) {
@@ -28073,7 +28446,9 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28073
28446
  "sap/viz/framework/common/util/ObjectUtils",
28074
28447
  "sap/viz/chart/behavior/config/ScreenReaderUtil",
28075
28448
  "sap/viz/chart/components/util/BoundingBoxUtils",
28076
- "sap/viz/chart/components/util/ChartTypeUtils"
28449
+ "sap/viz/chart/components/util/ChartTypeUtils",
28450
+ "sap/viz/chart/behavior/config/HighlightHelper",
28451
+ "sap/viz/framework/common/util/NumberUtils",
28077
28452
  ], function(
28078
28453
  SVG,
28079
28454
  UADetector,
@@ -28093,7 +28468,9 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28093
28468
  ObjectUtils,
28094
28469
  ScreenReaderUtil,
28095
28470
  BoundingBox,
28096
- ChartTypeUtils
28471
+ ChartTypeUtils,
28472
+ HighlightHelper,
28473
+ NumberUtils
28097
28474
  ) {
28098
28475
 
28099
28476
  var THRESHOLD = 0.05;
@@ -28646,55 +29023,259 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28646
29023
  var svgRect = currentNode.getBoundingClientRect(),
28647
29024
  digitalWidth = parseFloat(properties.width) || 1,
28648
29025
  dasharray = digitalWidth + ', ' + digitalWidth;
28649
-
28650
- if(properties.style && properties.style.toLowerCase() === 'solid'){
28651
- dasharray = 'none';
28652
- }
28653
29026
 
29027
+ if(properties.style && properties.style.toLowerCase() === 'solid'){
29028
+ //if properties.style (referenced from focus style class) is solid, no dash array needed
29029
+ dasharray = 'none';
29030
+ }
29031
+
28654
29032
  var boundNode = hoverNode.append("g").attr("class", "v-m-highlight");
28655
29033
  var bound = {
28656
29034
  rect: null,
28657
29035
  line: null,
28658
- polygon: null
28659
- };
28660
- var isStackedChart;
29036
+ polygon: null,
29037
+ path: null
29038
+ };
29039
+ var accSupportedChartType = ["info/bar", "info/dual_bar", "info/column",
29040
+ "info/dual_column", "info/timeseries_column", "info/timeseries_combination",
29041
+ "info/dual_timeseries_combination", "info/timeseries_stacked_column",
29042
+ "info/timeseries_100_stacked_column", "info/timeseries_waterfall",
29043
+ "info/timeseries_stacked_combination", "info/stacked_bar", "info/stacked_column",
29044
+ "info/dual_stacked_bar", "info/dual_stacked_column",
29045
+ "info/100_stacked_bar", "info/100_stacked_column",
29046
+ "info/100_dual_stacked_bar", "info/100_dual_stacked_column",
29047
+ "info/mekko", "info/horizontal_mekko",
29048
+ "info/100_mekko", "info/100_horizontal_mekko",
29049
+ "info/waterfall", "info/horizontal_waterfall",
29050
+ "info/stacked_waterfall", "info/horizontal_stacked_waterfall",
29051
+ "info/heatmap", "info/combination", "info/horizontal_combination",
29052
+ "info/dual_combination", "info/dual_horizontal_combination",
29053
+ "info/stacked_combination", "info/horizontal_stacked_combination",
29054
+ "info/dual_stacked_combination", "info/dual_horizontal_stacked_combination"];
29055
+ var isStackedChart, isAccSupported;
28661
29056
  if (properties.renderType) {
28662
29057
  isStackedChart = properties.renderType.indexOf('stacked') > -1;
29058
+ isAccSupported = accSupportedChartType.indexOf(service._getChartType()) > -1;
28663
29059
  }
29060
+ var strokeStyle = service.getProperties().get("interaction.keyboard.style");
28664
29061
  var angle = properties.angle;
28665
29062
  var isAccEnable = service && service.getProperties().get("interaction.enableAccUpdates");
28666
- properties.width = properties.width ? parseFloat(properties.width.split('px')[0]) : 1;
28667
29063
  if (isStackedChart && properties.isZeroValueInStack && properties.isZeroOnFirstTab) {
28668
29064
  bound.line = boundNode.append('line').attr('class', 'v-highlight-bound')
28669
29065
  .attr("stroke", properties.color)
28670
- .attr("stroke-width", properties.width).attr("stroke-dasharray", dasharray)
28671
- .style("pointer-events", "none" );
29066
+ .attr("stroke-width", properties.width)
29067
+ .attr("stroke-dasharray", dasharray)
29068
+ .style("pointer-events", "none");
28672
29069
  } 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"))
29070
+ if (isAccEnable) {
29071
+ var cls = d3Node.attr("class") || "";
29072
+ var parentNode = currentNode.parentNode;
29073
+ var parentCls = d3.select(parentNode).attr("class") || "";
29074
+ var isLabel = /^viz-axis-label/.test(cls) ||
29075
+ (currentNode && currentNode.tagName && currentNode.tagName.toLowerCase() === "text");
29076
+ var isDonutDatapoint = /scatter|bubble|pie|donut/.test(properties.renderType) &&
29077
+ selectBound === 'path';
29078
+ var isLegend = parentCls.includes("v-legend-element") ||
29079
+ parentCls.includes("v-legend-item");
29080
+
29081
+ bound.rect = boundNode.append("rect")
29082
+ .attr("class", "v-highlight-bound")
29083
+ .attr("transform", d3Node.attr("transform"))
28682
29084
  .attr("fill", "transparent")
28683
29085
  .attr("fill-opacity", 0)
28684
- .attr("stroke", properties.color)
28685
- .attr("stroke-width", properties.width * 2)
28686
- .attr("stroke-dasharray", dasharray)
28687
29086
  .attr("shape-rendering", "crispEdges")
28688
29087
  .style("pointer-events", "none")
28689
- .attr("clip-path", "url(#" + id + ")");
28690
- }else{
28691
- bound.rect = boundNode.append("rect").attr("class", "v-highlight-bound")
29088
+ .style("outline", "none");
29089
+
29090
+
29091
+ var keyboardStrokeProp = {};
29092
+ var keyProp = service.getProperties().get('interaction.keyboard');
29093
+ for (var index in keyProp) {
29094
+ if (keyProp.hasOwnProperty(index)) {
29095
+ keyboardStrokeProp[index] = keyProp[index];
29096
+ }
29097
+ }
29098
+ if (typeof properties.width === "string") {
29099
+ properties.width = properties.width ? parseFloat(properties.width.split('px')[0]) : 1;
29100
+ } else {
29101
+ properties.width = properties.width ? parseFloat(properties.width) : 1;
29102
+ }
29103
+
29104
+ if (isAccSupported && !isLabel) {
29105
+ bound.rect
29106
+ .attr("x", d3Node.attr("x"))
29107
+ .attr("y", d3Node.attr("y"))
29108
+ .attr("width", d3Node.attr("width"))
29109
+ .attr("height", d3Node.attr("height"))
29110
+ .attr("stroke", "none")
29111
+ .attr("stroke-width", null)
29112
+ .attr("stroke-dasharray", null);
29113
+ if (isLegend) {
29114
+ bound.rect = boundNode.append("rect").attr("class", "v-highlight-bound")
29115
+ .attr("transform", d3Node.attr("transform"))
29116
+ .attr("width", d3Node.attr("width")).attr("height", d3Node.attr("height"))
29117
+ .attr("x", d3Node.attr("x")).attr("y", d3Node.attr("y"))
29118
+ .attr("fill", "transparent").attr("fill-opacity", 0)
29119
+ .attr("stroke", properties.color)
29120
+ .attr("stroke-width", properties.width)
29121
+ .attr(
29122
+ "stroke-dasharray",
29123
+ (strokeStyle && strokeStyle.toLowerCase() === "solid") ?
29124
+ null :
29125
+ (strokeStyle && strokeStyle.toLowerCase() === "dotted") ?
29126
+ (properties.width + "," + properties.width) :
29127
+ dasharray
29128
+ )
29129
+ .attr("shape-rendering", "crispEdges").style("pointer-events", "none");
29130
+ } else {
29131
+ var nodes = document.querySelector('.v-stack');
29132
+ if (!nodes) {
29133
+ return;
29134
+ }
29135
+
29136
+ var gElements = nodes.getElementsByTagName('g');
29137
+ var gArray = Array.prototype.slice.call(gElements);
29138
+
29139
+ var targetG = null;
29140
+ for (var i = 0; i < gArray.length; i++) {
29141
+ var currentG = gArray[i];
29142
+ var tabindex = currentG.getAttribute('tabindex');
29143
+ if (tabindex === '0') {
29144
+ targetG = currentG;
29145
+ break;
29146
+ }
29147
+ }
29148
+ var isStillFocused = targetG &&
29149
+ targetG.getAttribute('tabindex') === '0' &&
29150
+ targetG === document.activeElement;
29151
+ if (!isStillFocused) {
29152
+ return;
29153
+ }
29154
+ keyboardStrokeProp.visible = true;
29155
+ d3.select(targetG).select('.v-m-highlight').remove();
29156
+ HighlightHelper.drawInnerStroke(
29157
+ service, targetG, 'rect', "keyboard", keyboardStrokeProp,
29158
+ undefined,
29159
+ false,
29160
+ undefined
29161
+ );
29162
+
29163
+ }
29164
+ } else if (isDonutDatapoint) {
29165
+ var pieDatapointClippathId = "clip-path=" + Math.random().toString(36).slice(2);
29166
+ boundNode.append('clipPath')
29167
+ .attr("class", CLIPPATH)
29168
+ .attr("id", pieDatapointClippathId)
29169
+ .append("path")
29170
+ .attr("d", d3Node.attr("d"));
29171
+ bound.path = boundNode.append('path')
29172
+ .attr("d", d3Node.attr("d"))
29173
+ .attr("fill", "transparent")
29174
+ .attr("fill-opacity", 0)
29175
+ .attr("stroke", properties.color)
29176
+ .attr("stroke-width", properties.width * 2)
29177
+ .attr("stroke-dasharray", dasharray)
29178
+ .attr("shape-rendering", "crispEdges")
29179
+ .style("pointer-events", "none")
29180
+ .attr("clip-path", "url(#" + pieDatapointClippathId + ")");
29181
+ } else if (!isAccSupported) {
29182
+ bound.rect = boundNode.append("rect").attr("class", "v-highlight-bound")
29183
+ .attr("transform", d3Node.attr("transform"))
29184
+ .attr("width", d3Node.attr("width")).attr("height", d3Node.attr("height"))
29185
+ .attr("x", d3Node.attr("x")).attr("y", d3Node.attr("y"))
29186
+ .attr("fill", "transparent").attr("fill-opacity", 0)
29187
+ .attr("stroke", properties.color)
29188
+ .attr("stroke-width", properties.width)
29189
+ .attr(
29190
+ "stroke-dasharray",
29191
+ (strokeStyle && strokeStyle.toLowerCase() === "solid") ?
29192
+ null :
29193
+ (strokeStyle && strokeStyle.toLowerCase() === "dotted") ?
29194
+ (properties.width + "," + properties.width) :
29195
+ dasharray
29196
+ )
29197
+ .attr("shape-rendering", "crispEdges").style("pointer-events", "none");
29198
+ }
29199
+
29200
+ if (isLabel) {
29201
+ if (selectBound === AXIS_ITEM_NODE_BOUND_ACC) {
29202
+ var id = "clip-path=" + Math.random().toString(36).slice(2);
29203
+ boundNode.append('clipPath')
29204
+ .attr("class", CLIPPATH)
29205
+ .attr("id", id)
29206
+ .append("polygon")
29207
+ .attr("points", d3Node.attr("points"));
29208
+ bound.polygon = boundNode.append("polygon").attr("class", "v-highlight-bound")
29209
+ .attr("points", d3Node.attr("points"))
29210
+ .attr("fill", "transparent")
29211
+ .attr("fill-opacity", 0)
29212
+ .attr("stroke", properties.color)
29213
+ .attr("stroke-width", properties.width * 2)
29214
+ .attr("stroke-dasharray", dasharray)
29215
+ .attr("shape-rendering", "crispEdges")
29216
+ .style("pointer-events", "none")
29217
+ .attr("clip-path", "url(#" + id + ")");
29218
+ } else {
29219
+ var bbox = currentNode.getBBox();
29220
+ var roundedX = Math.round(bbox.x);
29221
+ var roundedY = Math.round(bbox.y);
29222
+ var roundedWidth = Math.round(bbox.width);
29223
+ var roundedHeight = Math.round(bbox.height);
29224
+ var scale = 1;
29225
+ var parentTransform = d3.select(currentNode.parentNode).attr("transform");
29226
+ if (parentTransform && /scale\(([^)]+)\)/.test(parentTransform)) {
29227
+ scale = parseFloat(parentTransform.match(/scale\(([^)]+)\)/)[1]) || 1;
29228
+ }
29229
+
29230
+ var baseDash = 4;
29231
+ var baseGap = 2;
29232
+ var scaledDash = NumberUtils.preciseSimple(baseDash / scale, 1);
29233
+ var scaledGap = NumberUtils.preciseSimple(baseGap / scale, 1);
29234
+
29235
+ bound.rect
29236
+ .attr("x", roundedX)
29237
+ .attr("y", roundedY)
29238
+ .attr("width", roundedWidth)
29239
+ .attr("height", roundedHeight)
29240
+ .attr("stroke", keyboardStrokeProp.color)
29241
+ .attr("stroke-width", keyboardStrokeProp.width || 1)
29242
+ .attr(
29243
+ "stroke-dasharray",
29244
+ (strokeStyle && strokeStyle.toLowerCase() === "solid") ?
29245
+ null :
29246
+ (strokeStyle && strokeStyle.toLowerCase() === "dotted") ?
29247
+ ((keyboardStrokeProp.width || 1) + "," + (keyboardStrokeProp.width || 1)) :
29248
+ (keyboardStrokeProp.dasharray ?
29249
+ keyboardStrokeProp.dasharray :
29250
+ (scaledDash + "," + scaledGap)
29251
+ )
29252
+ )
29253
+ .attr("shape-rendering", "crispsEdges")
29254
+ .attr("class", "v-highlight-bound")
29255
+ .attr("transform", d3Node.attr("transform"))
29256
+ .attr("fill", "transparent")
29257
+ .attr("fill-opacity", 0)
29258
+ .attr("shape-rendering", "crispEdges")
29259
+ .style("pointer-events", "none")
29260
+ .style("outline", "none");
29261
+ }
29262
+ }
29263
+ } else {
29264
+ bound.rect = boundNode.append("rect").attr("class", "v-highlight-bound")
28692
29265
  .attr("transform", d3Node.attr("transform"))
28693
29266
  .attr("width", d3Node.attr("width")).attr("height", d3Node.attr("height"))
28694
29267
  .attr("x", d3Node.attr("x")).attr("y", d3Node.attr("y"))
28695
29268
  .attr("fill", "transparent").attr("fill-opacity", 0)
28696
29269
  .attr("stroke", properties.color)
28697
- .attr("stroke-width", properties.width).attr("stroke-dasharray", dasharray)
29270
+ .attr("stroke-width", properties.width)
29271
+ .attr(
29272
+ "stroke-dasharray",
29273
+ (strokeStyle && strokeStyle.toLowerCase() === "solid") ?
29274
+ null :
29275
+ (strokeStyle && strokeStyle.toLowerCase() === "dotted") ?
29276
+ properties.width + "," + properties.width :
29277
+ dasharray
29278
+ )
28698
29279
  .attr("shape-rendering", "crispEdges").style("pointer-events", "none");
28699
29280
  }
28700
29281
  }
@@ -28775,7 +29356,7 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28775
29356
  x -= strokeWidth;
28776
29357
  y -= strokeWidth;
28777
29358
  width = width ? width + 2 * strokeWidth : 0;
28778
- height = height? height + 2 * strokeWidth : 0;
29359
+ height = height ? height + 2 * strokeWidth : 0;
28779
29360
  }
28780
29361
  if (TypeUtils.isExist(bound.line) || TypeUtils.isExist(bound.rect)) {
28781
29362
  var pos = {
@@ -28818,7 +29399,7 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28818
29399
  .attr("y2", y);
28819
29400
  } else {
28820
29401
  bound.line.attr("x1", x).attr("y1", y).attr("x2", x)
28821
- .attr("y2",y + sizeInfo.height);
29402
+ .attr("y2", y + sizeInfo.height);
28822
29403
  }
28823
29404
  bound.line.attr("transform", "translate(" + transform.a + "," + transform.b + ")");
28824
29405
  if (properties.bCloseCategory || isOverLapInStack(hoverPos, stackPos, properties, ZERO_FOCUS.LINE)) {
@@ -28849,10 +29430,16 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28849
29430
  }
28850
29431
  }
28851
29432
  } else if (!angle || angle % 90 === 0) {
29433
+ if(selectBound === LEGEND_ITEM_BOUND){
29434
+ return;
29435
+ }
29436
+ //feier - DINC0114948: legend focus border too close to chart UI, need more spacing
29437
+ //in case of legend, no need to shift the x position, otherwise focus will touch marker
29438
+ //so exiting out of function
28852
29439
  var parentRect = mainBoundNode.getBoundingClientRect();
28853
29440
  var intersectionBoundRect = BoundingBox.intersection(parentRect, svgRect);
28854
29441
  if (intersectionBoundRect) {
28855
- if(!isAccEnable || (selectBound !== AXIS_ITEM_NODE_BOUND_ACC)){
29442
+ if (!isAccEnable || (selectBound !== AXIS_ITEM_NODE_BOUND_ACC)) {
28856
29443
  bound.rect.attr("width", intersectionBoundRect.width)
28857
29444
  .attr("height", intersectionBoundRect.height);
28858
29445
  /*
@@ -28923,9 +29510,9 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28923
29510
  var clearTabIndexForTabbingOut = function(service){
28924
29511
  var tabindex0 = service._rootNode.selectAll('[tabindex="0"]')[0];
28925
29512
  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
29513
+ //need to have exactly one element have tabindex 0,
29514
+ //otherwise can'tab out of the DOM
29515
+ //the element can be axis or legend item, preferably not datapoint
28929
29516
 
28930
29517
  service._rootNode.selectAll('.v-datapoint[tabindex="0"]').attr("tabindex",null);
28931
29518
  tabindex0 = service._rootNode.selectAll('[tabindex="0"]')[0];
@@ -28940,16 +29527,19 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28940
29527
  return (chartType.indexOf("heatmap") > -1);
28941
29528
  };
28942
29529
 
29530
+ if(isHeatMap(service)){
29531
+ //heat map behaving differently for some reason, needs special handling
29532
+ service._rootNode
29533
+ .selectAll('rect[tabindex="0"]')
29534
+ .attr("tabindex", null);
29535
+ tabindex0 = service._rootNode.selectAll('[tabindex="0"]')[0];
29536
+ }
29537
+
28943
29538
  var legend_indicator = isTreeMap(service) || isHeatMap(service) ? '.v-mbc-legend-item' : '.v-legend-item';
28944
29539
  var legend_node = service._rootNode.select(legend_indicator.concat('[tabindex="0"]')).node();
28945
29540
 
28946
29541
  var not_legend_selector = ":not(" + legend_indicator + ")";
28947
29542
 
28948
- if(isHeatMap(service)){
28949
- //heat map behaving differently for some reason
28950
- return;
28951
- }
28952
-
28953
29543
  if(legend_node){
28954
29544
  service._rootNode
28955
29545
  .selectAll('[tabindex="0"]')
@@ -28960,9 +29550,10 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
28960
29550
  .selectAll('[tabindex="0"]')
28961
29551
  .filter(function(d,i){return i<tabindex0.length-1;})
28962
29552
  .attr("tabindex", null);
28963
- }
29553
+ }
28964
29554
 
28965
29555
  }
29556
+
28966
29557
  };
28967
29558
 
28968
29559
 
@@ -29063,6 +29654,11 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
29063
29654
  else {
29064
29655
  boundNode = "rect";
29065
29656
  }
29657
+ if(isAccEnable){
29658
+ if (/pie|donut/.test(renderType)) {
29659
+ boundNode = "path";
29660
+ }
29661
+ }
29066
29662
  hoveredTargetNode = service.getStatus("keyArrowHoveredDataPoint");
29067
29663
  oldHovredTargetId = service.getStatus("hoveredDataPointId");
29068
29664
  if (!hoveredTargetNode) {
@@ -29556,6 +30152,11 @@ define('sap/viz/chart/behavior/config/handler/KeyboardBehaviorHandler',[
29556
30152
  } else {
29557
30153
  boundNode = "rect";
29558
30154
  }
30155
+ if(isAccEnable){
30156
+ if (/pie|donut/.test(renderType)) {
30157
+ boundNode = "path";
30158
+ }
30159
+ }
29559
30160
  hoveredDataPointId = service.getStatus("hoveredDataPointId");
29560
30161
  dpGroupNode = service.getNodes(service.NodeType.DATA_POINT_GROUP);
29561
30162
  hoveredTarget = dpGroupNode.node()
@@ -42916,9 +43517,9 @@ define('sap/viz/chart/components/datalabels/DataLabels',[
42916
43517
  if(!color || range === 'outside'){
42917
43518
  //dataLabelColor may need to be calculated.
42918
43519
  //check if dataLabel "covers" dataPoint.
42919
- var outOfDataPoint = this.isDataLabelOutOfDataPoint(item.node, item);
43520
+ outOfDataPoint = this.isDataLabelOutOfDataPoint(item.node, item);
42920
43521
  //backcolor is refercolor or backgroundColor
42921
- var backColor = null;
43522
+ backColor = null;
42922
43523
  if(color && range === 'outside' && !outOfDataPoint){
42923
43524
  // process case then customer set a data label color and set "colorRange" to "outside"
42924
43525
  backColor = referColor|| "#000000";
@@ -47958,12 +48559,14 @@ define('sap/viz/chart/components/renderers/ReferenceLineRenderer',['sap/viz/fram
47958
48559
  'sap/viz/framework/common/util/FiscalUtil',
47959
48560
  'sap/viz/framework/common/util/NameColorUtils',
47960
48561
  "sap/viz/framework/common/util/DataGraphics",
47961
- 'sap/viz/framework/common/util/TimeUtil'
48562
+ 'sap/viz/framework/common/util/TimeUtil',
48563
+ 'sap/viz/framework/common/util/ACCStyleUtils'
47962
48564
  ], function (SVG, TextUtils, Constants, StyleUtils, TypeUtils,
47963
48565
  FiscalUtil,
47964
48566
  NameColorUtils,
47965
48567
  DataGraphics,
47966
- TimeUtil) {
48568
+ TimeUtil,
48569
+ ACCStyleUtils) {
47967
48570
 
47968
48571
  var ReferenceLineRenderer = {};
47969
48572
 
@@ -48114,8 +48717,15 @@ define('sap/viz/chart/components/renderers/ReferenceLineRenderer',['sap/viz/fram
48114
48717
  var config = options.combinedConfig;
48115
48718
  var labelTextGroup = SVG.create("g", options.labelsGroupDOM);
48116
48719
  labelTextGroup.setAttribute("class", "v-referenceline-label v-referenceline-label-" + options.key);
48117
- labelTextGroup.setAttribute("fill",
48118
- config.label.color ? config.label.color : config.axisColor);
48720
+ var fill = config.label.color ? config.label.color : config.axisColor;
48721
+ var textShadow = 'none';
48722
+ if (options.enableAcc) {
48723
+ if (options.color) {
48724
+ fill = ACCStyleUtils.getTextColor(options.color);
48725
+ textShadow = ACCStyleUtils.getTextShadowStyle(options.color);
48726
+ }
48727
+ }
48728
+ labelTextGroup.setAttribute("fill", fill);
48119
48729
  labelTextGroup.setAttribute("font-size", config.label.fontSize);
48120
48730
  labelTextGroup.setAttribute("font-weight", config.label.fontWeight);
48121
48731
  labelTextGroup.setAttribute("font-family", config.label.fontFamily);
@@ -48148,6 +48758,7 @@ define('sap/viz/chart/components/renderers/ReferenceLineRenderer',['sap/viz/fram
48148
48758
  var text = SVG.create("text", labelTextGroup);
48149
48759
  text.textContent = config.label.text;
48150
48760
  text.setAttribute("text-anchor", config.textAnchor);
48761
+ text.setAttribute("style", 'text-shadow: ' + textShadow + ';');
48151
48762
 
48152
48763
  if (!options.isHorizontal) {
48153
48764
  var widthPos = options.pos * options.width;
@@ -48461,6 +49072,8 @@ define('sap/viz/chart/components/renderers/ReferenceLineRenderer',['sap/viz/fram
48461
49072
  labelOptions.height = options.height;
48462
49073
  labelOptions.axisLayout = axisLayout;
48463
49074
  labelOptions.plotInstance = options.plotInstance;
49075
+ labelOptions.color = config.color;
49076
+ labelOptions.enableAcc = options.enableAcc;
48464
49077
 
48465
49078
  var labelObj = this._drawLabel(labelOptions);
48466
49079
  if (labelObj) {
@@ -49273,6 +49886,7 @@ define('sap/viz/chart/components/plots/BasePlot',[
49273
49886
  //reference labels.
49274
49887
  options.plotInstance = this;
49275
49888
  options.clipPath = this.clipPath;
49889
+ options.enableAcc = this._properties.origin.get('interaction.enableAccUpdates') || false;
49276
49890
  referenceLineRenderer.render(options);
49277
49891
  };
49278
49892
 
@@ -49801,33 +50415,32 @@ define('sap/viz/chart/components/plots/BasePlot',[
49801
50415
  config.matchSemantic = true;
49802
50416
  }
49803
50417
 
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;
50418
+ if (result.properties.stroke) {
50419
+ config.graphic.stroke = result.properties.stroke;
49808
50420
  }
49809
- var enableAccUpdates = this._properties.origin.get('interaction.enableAccUpdates') || false;
50421
+ if (result.properties.strokeWidth) {
50422
+ config.graphic.strokeWidth = result.properties.strokeWidth;
50423
+ }
50424
+ }
49810
50425
 
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
- }
50426
+ var enableAccUpdates = this._properties.origin.get('interaction.enableAccUpdates') || false;
50427
+ var isExcludedChartType = ACCStyleUtils.isExcludedChartType(this._semanticMgr._chartType);
50428
+ if (enableAccUpdates && !isExcludedChartType) {
50429
+ var vizTheme = config.effectManager._getTemplate() ?
50430
+ config.effectManager._getTemplate().name : null;
50431
+ var theme = ACCStyleUtils.getTheme(vizTheme);
50432
+ if (!this._checkColorContrast(config, theme)) {
50433
+ var resultColor = null;
50434
+ if (result &&
50435
+ result.properties &&
50436
+ result.properties.hasOwnProperty("color")) {
50437
+ resultColor = result.properties.color;
50438
+ }
50439
+ resultColor = resultColor || config.data.color;
50440
+ var accBorder = ACCStyleUtils.getBorderColor(resultColor);
50441
+ var accBorderWidth = ACCStyleUtils.getBorderWidth();
50442
+ config.graphic.stroke = accBorder ? accBorder : config.graphic.stroke;
50443
+ config.graphic.strokeWidth = accBorderWidth ? accBorderWidth : config.graphic.strokeWidth;
49831
50444
  }
49832
50445
  }
49833
50446
 
@@ -50608,7 +51221,10 @@ define('sap/viz/chart/components/renderers/BarRenderer',[ "sap/viz/framework/com
50608
51221
  node.setAttribute('stroke', graphic.stroke);
50609
51222
  node.setAttribute('stroke-width', graphic.strokeWidth);
50610
51223
  }
50611
- }
51224
+ }
51225
+ if (graphic.innerStroke && graphic.innerStroke.visible) {
51226
+ node._innerStrokeConfig = config;
51227
+ }
50612
51228
  }
50613
51229
 
50614
51230
  DataGraphics.setCustomizationInfo(node, {'defaultRenderer' : true});
@@ -53439,23 +54055,78 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForBar',[
53439
54055
  }
53440
54056
  var prop;
53441
54057
  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;
54058
+ if (!isAccEnable) {
54059
+ mainNode.forEach(function (e) {
54060
+ var width = 1;
54061
+ if (gray || bUseRange) {
54062
+ prop = props.get('interaction.deselected');
54063
+ if (bUseRange) {
54064
+ prop = ObjectUtils.extend(true, {}, prop);
54065
+ prop.opacity = 1;
54066
+ }
54067
+ } else {
54068
+ prop = props.get('plotArea.dataPoint');
54069
+ width = DataGraphics.getData(e).strokeWidth;
53449
54070
  }
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
- });
54071
+ var extraData = DataGraphics.getData(e);
54072
+ HighlightHelper.drawStroke(service, e, 'rect', prop.stroke,
54073
+ TypeUtils.isExist(width) ? width : 1, undefined, extraData);
54074
+ HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
54075
+ });
54076
+ } else {
54077
+ var isClickBlank = Object.keys(event.data).length <= 1;
54078
+ mainNode.forEach(function (e) {
54079
+ var width = 1;
54080
+ if (gray || bUseRange) {
54081
+ prop = props.get('interaction.deselected');
54082
+ if (bUseRange) {
54083
+ var tempProp = {};
54084
+ for (var key in prop) {
54085
+ if (prop.hasOwnProperty(key)) {
54086
+ tempProp[key] = prop[key];
54087
+ }
54088
+ }
54089
+ tempProp.opacity = 1;
54090
+ prop = tempProp;
54091
+ }
54092
+ } else {
54093
+ prop = props.get('plotArea.dataPoint');
54094
+ var data = DataGraphics.getData(e);
54095
+ if (data && data.strokeWidth != null) {
54096
+ width = data.strokeWidth;
54097
+ }
54098
+ }
54099
+
54100
+ var strokeProp = {};
54101
+ for (var i in prop.stroke) {
54102
+ if (prop.stroke.hasOwnProperty(i)) {
54103
+ strokeProp[i] = prop.stroke[i];
54104
+ }
54105
+ }
54106
+ if (isClickBlank) {
54107
+ d3.select(e).classed(CSS_CLASS.DATAPOINTDESELECTED, false);
54108
+
54109
+ HighlightHelper.drawStroke(
54110
+ service, e, 'rect', prop.stroke,
54111
+ DataGraphics.getData(e).strokeWidth || 1, undefined, DataGraphics.getData(e)
54112
+ );
54113
+ HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
54114
+
54115
+ d3.select(e).selectAll('rect')
54116
+ .attr("clip-path", null)
54117
+ .attr("data-inner-stroke-width", null)
54118
+ .attr("stroke-dasharray", null);
54119
+ } else {
54120
+ d3.select(e).classed(CSS_CLASS.DATAPOINTDESELECTED, true);
54121
+ HighlightHelper.drawInnerStroke(
54122
+ service, e, 'rect', "select", strokeProp,
54123
+ DataGraphics.getData(e).strokeWidth, false, DataGraphics.getData(e)
54124
+ );
54125
+ HighlightHelper.drawFill(service, e, 'rect, path', prop, isMarkerRendererExist);
54126
+ }
54127
+ });
54128
+ }
54129
+
53459
54130
  }
53460
54131
  }, {
53461
54132
  "id": "clearPlot_timeseries_column",
@@ -55921,6 +56592,22 @@ define('sap/viz/chart/components/plots/StackedColumnPlot',[
55921
56592
  var isCustom = (cpRenderer !== this._dataPointRenderer && cpRenderer );
55922
56593
  var stackCtx = [], origGraphic, dataPointG;
55923
56594
  var extraData, value;
56595
+ var isAccEnable = this._properties.origin.get("interaction.enableAccUpdates");
56596
+ var segmentGap = 0;
56597
+ if (isAccEnable) {
56598
+ var renderType = (this._options && this._options.renderType) ||
56599
+ (this._properties && this._properties._props &&
56600
+ this._properties._props.renderType &&
56601
+ this._properties._props.renderType.value) || "";
56602
+
56603
+ var isMekkoType = /(^|_)mekko/i.test(renderType);
56604
+
56605
+ if (!isMekkoType && this._properties && this._properties._props &&
56606
+ this._properties._props["plotArea.segmentGap"] &&
56607
+ typeof this._properties._props["plotArea.segmentGap"].value !== "undefined") {
56608
+ segmentGap = +this._properties._props["plotArea.segmentGap"].value || 0;
56609
+ }
56610
+ }
55924
56611
  stackCtx.range = [0, 0];
55925
56612
  if (!updateOnly) {
55926
56613
  categoryG = SVG.create("g");
@@ -55954,8 +56641,20 @@ define('sap/viz/chart/components/plots/StackedColumnPlot',[
55954
56641
  origGraphic = ObjectUtils.extend({}, config.graphic);
55955
56642
  config.graphic.stackWidth = stackWidth;
55956
56643
  config.graphic.stackHeight = stackHeight;
55957
- config.graphic.x = config.horizontal ? position.x - x0 : 0;
55958
- config.graphic.y = config.horizontal ? 0 : position.y - y0;
56644
+ if (segmentGap > 0) {
56645
+ if (config.horizontal) {
56646
+ config.graphic.x = position.x - x0 + segmentGap / 2;
56647
+ config.graphic.width = Math.max(0, config.graphic.width - segmentGap);
56648
+ config.graphic.y = 0;
56649
+ } else {
56650
+ config.graphic.y = position.y - y0 + segmentGap / 2;
56651
+ config.graphic.height = Math.max(0, config.graphic.height - segmentGap);
56652
+ config.graphic.x = 0;
56653
+ }
56654
+ } else {
56655
+ config.graphic.x = config.horizontal ? (position.x - x0) : 0;
56656
+ config.graphic.y = config.horizontal ? 0 : (position.y - y0);
56657
+ }
55959
56658
  var defaultRendered = false;
55960
56659
 
55961
56660
  if (updateOnly) {
@@ -56001,7 +56700,13 @@ define('sap/viz/chart/components/plots/StackedColumnPlot',[
56001
56700
  newDataPoints.push(dataPointG);
56002
56701
  }
56003
56702
 
56004
- dataPointG.setAttribute("transform", 'translate(' + position.x + ', ' + position.y + ')');
56703
+ if (segmentGap > 0) {
56704
+ var tx = position.x + (config.horizontal ? segmentGap / 2 : 0);
56705
+ var ty = position.y + (config.horizontal ? 0 : segmentGap / 2);
56706
+ dataPointG.setAttribute("transform", 'translate(' + tx + ', ' + ty + ')');
56707
+ } else {
56708
+ dataPointG.setAttribute("transform", 'translate(' + position.x + ', ' + position.y + ')');
56709
+ }
56005
56710
  config.graphic = origGraphic;
56006
56711
  if( dataModels && dataModels[i] && !dataModels[i].getData()){
56007
56712
  dataModels[i].init(config, currentIds[i], data[i],
@@ -56046,6 +56751,17 @@ define('sap/viz/chart/components/plots/StackedColumnPlot',[
56046
56751
  delete clonedGraphic.pattern;
56047
56752
  clonedGraphic.fill = "transparent";
56048
56753
  }
56754
+
56755
+ if (segmentGap > 0) {
56756
+ if (config.horizontal) {
56757
+ config.graphic.x += segmentGap / 2;
56758
+ config.graphic.width = Math.max(0, config.graphic.width - segmentGap);
56759
+ } else {
56760
+ config.graphic.y += segmentGap / 2;
56761
+ config.graphic.height = Math.max(0, config.graphic.height - segmentGap);
56762
+ }
56763
+ }
56764
+
56049
56765
  node = cpRenderer(config);
56050
56766
  if (clonedGraphic) {
56051
56767
  shadowNode = cpRenderer({ graphic: clonedGraphic });
@@ -56099,7 +56815,13 @@ define('sap/viz/chart/components/plots/StackedColumnPlot',[
56099
56815
  newDataPoints.push(dataPointG);
56100
56816
 
56101
56817
  }
56102
- dataPointG.setAttribute("transform", 'translate(' + position.x + ', ' + position.y + ')');
56818
+ if (segmentGap > 0) {
56819
+ var tx2 = position.x + (config.horizontal ? segmentGap / 2 : 0);
56820
+ var ty2 = position.y + (config.horizontal ? 0 : segmentGap / 2);
56821
+ dataPointG.setAttribute("transform", 'translate(' + tx2 + ', ' + ty2 + ')');
56822
+ } else {
56823
+ dataPointG.setAttribute("transform", 'translate(' + position.x + ', ' + position.y + ')');
56824
+ }
56103
56825
  if(dataModels && dataModels[i] && !dataModels[i].getData()){
56104
56826
  dataModels[i].init(config, currentIds[i], data[i],
56105
56827
  dataPoints[i].id || Constants.NULL_VALUE, null);
@@ -56886,7 +57608,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56886
57608
  'sap/viz/framework/interaction/Constants',
56887
57609
  'sap/viz/chart/behavior/config/handler/DataPointBehaviorHandler',
56888
57610
  "sap/viz/framework/interaction/BehaviorManager"
56889
- ], function(
57611
+ ], function (
56890
57612
  Constants,
56891
57613
  TypeUtils,
56892
57614
  HighlightHelper,
@@ -56901,10 +57623,15 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56901
57623
 
56902
57624
  var timeLineType = ["info/timeseries_line"];
56903
57625
  var timeCombTypes = ["info/timeseries_combination",
56904
- "info/dual_timeseries_combination",
56905
- "info/timeseries_stacked_combination"];
57626
+ "info/dual_timeseries_combination",
57627
+ "info/timeseries_stacked_combination"];
56906
57628
  var TimeLineAndComb = timeLineType.concat(timeCombTypes);
56907
57629
 
57630
+ var barCombTypes = ["info/combination", "info/horizontal_combination",
57631
+ "info/dual_combination", "info/dual_horizontal_combination",
57632
+ "info/stacked_combination", "info/horizontal_stacked_combination",
57633
+ "info/dual_stacked_combination", "info/dual_horizontal_stacked_combination"];
57634
+
56908
57635
  var lineType2 = [
56909
57636
  "info/line", "info/horizontal_line",
56910
57637
  "info/dual_line", "info/dual_horizontal_line",
@@ -56929,7 +57656,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56929
57656
  "name": "selectDataPoint",
56930
57657
  "supportedChartTypes": lineType2,
56931
57658
  },
56932
- "handler": function(event, service) {
57659
+ "handler": function (event, service) {
56933
57660
  if (service.isBigDataMode()) {
56934
57661
  DPBhvrHdlr.selectOnLineDuringBigData(event, service);
56935
57662
  } else {
@@ -56942,7 +57669,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56942
57669
  "name": "deselectDataPoint",
56943
57670
  "supportedChartTypes": lineType2
56944
57671
  },
56945
- "handler": function(event, service) {
57672
+ "handler": function (event, service) {
56946
57673
  if (service.isBigDataMode()) {
56947
57674
  return;
56948
57675
  }
@@ -56952,7 +57679,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56952
57679
  var properties = service.getProperties();
56953
57680
  var lineRenderer;
56954
57681
  var isMarkerRendererExist = TypeUtils.isExist(properties.get('plotArea.markerRenderer'));
56955
- elements.forEach(function(e) {
57682
+ elements.forEach(function (e) {
56956
57683
  DataPointUtils.unhighlight(e);
56957
57684
  lineRenderer = DPBhvrHdlr.getLineRenderer(service, e);
56958
57685
  DPBhvrHdlr.renderLightLine(service, e, false, lineRenderer);
@@ -56979,6 +57706,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56979
57706
  "supportedChartTypes": lineType2
56980
57707
  },
56981
57708
  "handler": function (event, service) {
57709
+ var isBarComb = barCombTypes.indexOf(service._getChartType()) > -1;
56982
57710
  if (service.isBigDataMode() && !service.isTrellis()) {
56983
57711
  DPBhvrHdlr.highlightOnLineDuringBigData(event, service);
56984
57712
  }
@@ -56986,13 +57714,38 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
56986
57714
  service.fireEvent(event, true);
56987
57715
  var elements = HighlightHelper.turnToArray(event.data.targets);
56988
57716
  var properties = service.getProperties();
56989
- var prop = properties.get('interaction.hover');
57717
+ var isAccEnable = properties.get("interaction.enableAccUpdates");
57718
+ var prop;
57719
+ if (isAccEnable) {
57720
+ prop = event.data.byKeyboard ?
57721
+ properties.get('interaction.keyboard') || properties.get('interaction.hover') :
57722
+ properties.get('interaction.hover');
57723
+ if (prop && !prop.stroke) {
57724
+ prop = {
57725
+ stroke: {
57726
+ color: prop.color,
57727
+ width: prop.width,
57728
+ visible: true
57729
+ }
57730
+ };
57731
+ }
57732
+ } else {
57733
+ prop = properties.get('interaction.hover');
57734
+ }
56990
57735
  var isMarkerRenderExist = TypeUtils.isExist(properties.get('plotArea.markerRenderer'));
57736
+
56991
57737
  elements.forEach(function (e) {
56992
57738
  var extraData = DataGraphics.getData(e) || {};
56993
57739
  var bSetChildOpacity = !extraData.isZeroValue;
56994
- HighlightHelper.drawStroke(service, e, event.data.byKeyboard ? 'path' : 'path, rect',
56995
- prop.stroke, 2, undefined, extraData);
57740
+ if (isAccEnable && isBarComb) {
57741
+ HighlightHelper.drawInnerStroke(
57742
+ service, e, 'path, rect', event.data.byKeyboard ? "keyboard" : "hover", prop.stroke,
57743
+ DataGraphics.getData(e).strokeWidth, false, DataGraphics.getData(e)
57744
+ );
57745
+ } else {
57746
+ HighlightHelper.drawStroke(service, e, event.data.byKeyboard ? 'path' : 'path, rect',
57747
+ prop.stroke, 2, undefined, extraData);
57748
+ }
56996
57749
  HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
56997
57750
  });
56998
57751
  }
@@ -57007,11 +57760,13 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57007
57760
  if (service.isBigDataMode() && !service.isTrellis()) {
57008
57761
  DPBhvrHdlr.unhighlightOnLineDuringBigData(event, service);
57009
57762
  } else {
57763
+ var isBarComb = barCombTypes.indexOf(service._getChartType()) > -1;
57010
57764
  service.fireEvent(event, true);
57011
57765
  var elements = HighlightHelper.turnToArray(event.data.targets);
57012
57766
  var props = service.getProperties();
57013
57767
  var prop;
57014
57768
  var isMarkerRenderExist = TypeUtils.isExist(props.get('plotArea.markerRenderer'));
57769
+ var isAccEnable = props.get("interaction.enableAccUpdates");
57015
57770
  elements.forEach(function (e) {
57016
57771
  var visible;
57017
57772
  var width = 1;
@@ -57031,7 +57786,20 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57031
57786
  visible = false;
57032
57787
  }
57033
57788
  var bSetChildOpacity = !extraData.isZeroValue;
57034
- HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width);
57789
+ if (isAccEnable && isBarComb) {
57790
+ HighlightHelper.drawInnerStroke(
57791
+ service,
57792
+ e,
57793
+ 'path, rect',
57794
+ event.data.byKeyboard ? "keyboard" : "hover",
57795
+ prop,
57796
+ extraData.strokeWidth,
57797
+ false,
57798
+ extraData
57799
+ );
57800
+ } else {
57801
+ HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width);
57802
+ }
57035
57803
  HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
57036
57804
  if (!visible) {
57037
57805
  setMakerOpacity(service, e);
@@ -57045,7 +57813,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57045
57813
  "name": "clearPlot",
57046
57814
  "supportedChartTypes": lineType2
57047
57815
  },
57048
- "handler": function(event, service) {
57816
+ "handler": function (event, service) {
57049
57817
  service.fireEvent(event, true);
57050
57818
  service._getDecorationLayer().clear();
57051
57819
 
@@ -57061,8 +57829,10 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57061
57829
  if (!mainNode || !mainNode.length) {
57062
57830
  return;
57063
57831
  }
57832
+
57833
+ var isClickBlank = Object.keys(event.data).length <= 1;
57064
57834
  var isMarkerRenderExist = TypeUtils.isExist(properties.get('plotArea.markerRenderer'));
57065
- mainNode.forEach(function(e) {
57835
+ mainNode.forEach(function (e) {
57066
57836
  var width = 1;
57067
57837
  var extraData = DataGraphics.getData(e) || {};
57068
57838
  if (gray || bUseRange) {
@@ -57078,19 +57848,34 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57078
57848
  }
57079
57849
  }
57080
57850
  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);
57851
+
57852
+ if (isClickBlank) {
57853
+ HighlightHelper.drawInnerStroke(
57854
+ service, e, 'path, rect', "deselect",
57855
+ prop, width, undefined, extraData
57856
+ );
57857
+
57858
+ HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
57859
+
57860
+ d3.select(e).selectAll('rect, path')
57861
+ .attr("clip-path", null)
57862
+ .attr("stroke-width", width)
57863
+ .attr("stroke-dasharray", null);
57864
+ } else {
57865
+ HighlightHelper.drawStroke(service, e, 'path, rect', prop.stroke, width, undefined, extraData);
57866
+ HighlightHelper.drawFill(service, e, 'path, rect', prop, isMarkerRenderExist, bSetChildOpacity);
57867
+ }
57083
57868
  setMakerOpacity(service, e);
57084
57869
  });
57085
57870
  }
57086
- },{
57871
+ }, {
57087
57872
  "id": "hover_range_selection_line",
57088
57873
  "triggerEvent": {
57089
57874
  "name": "hover",
57090
57875
  "supportedChartTypes": TimeLineAndComb,
57091
57876
  "targets": "v-m-action-layerrange"
57092
57877
  },
57093
- "handler": function(event, service) {
57878
+ "handler": function (event, service) {
57094
57879
  DPBhvrHdlr.showDetailForRangeSelectionWhenHover(event, service);
57095
57880
  }
57096
57881
  }, {
@@ -57100,7 +57885,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57100
57885
  "supportedChartTypes": timeLineType,
57101
57886
  "targets": "v-m-plot"
57102
57887
  },
57103
- "handler": function(event, service) {
57888
+ "handler": function (event, service) {
57104
57889
  DPBhvrHdlr.hoverOnLineDuringBigData(event, service);
57105
57890
  }
57106
57891
  }, {
@@ -57110,7 +57895,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57110
57895
  "supportedChartTypes": timeLineType,
57111
57896
  "excludeTargets": ["v-m-plot", Constants.CSS.CLASS.DATAPOINTS_MODULE]
57112
57897
  },
57113
- "handler": function(event, service) {
57898
+ "handler": function (event, service) {
57114
57899
  if (service.getStatus("rangeSelection")) {
57115
57900
  return;
57116
57901
  }
@@ -57127,7 +57912,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57127
57912
  "supportedChartTypes": timeLineType,
57128
57913
  "excludeTargets": [CSS_CLASS.DATAPOINT, CSS_CLASS.DATALABEL]
57129
57914
  },
57130
- "handler": function(event, service) {
57915
+ "handler": function (event, service) {
57131
57916
  if (service.isBigDataMode() || service.getStatus("rangeSelection")) {
57132
57917
  return;
57133
57918
  }
@@ -57140,19 +57925,18 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57140
57925
  "supportedChartTypes": lineType,
57141
57926
  "excludeTargets": HighlightHelper.getDeselAllExTargets(),
57142
57927
  },
57143
- "handler": function(event, service) {
57928
+ "handler": function (event, service) {
57144
57929
 
57145
- if(!service.getProperties().get("interaction.enableDeselectAll")){
57930
+ if (!service.getProperties().get("interaction.enableDeselectAll")) {
57146
57931
  return;
57147
57932
  }
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 ) {
57933
+ if (service.isBigDataMode() && timeCombTypes.indexOf(service._getChartType()) > -1) {
57150
57934
  return;
57151
57935
  }
57152
57936
 
57153
- if(TimeLineAndComb.indexOf(service._getChartType()) > -1){
57937
+ if (TimeLineAndComb.indexOf(service._getChartType()) > -1) {
57154
57938
  DPBhvrHdlr.clickOnLineDuringBigData(event, service);
57155
- }else{
57939
+ } else {
57156
57940
  service.fireEvent(event, true);
57157
57941
  }
57158
57942
 
@@ -57163,7 +57947,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57163
57947
  "name": "clearPlot",
57164
57948
  "supportedChartTypes": TimeLineAndComb
57165
57949
  },
57166
- "handler": function(event, service) {
57950
+ "handler": function (event, service) {
57167
57951
  service.fireEvent(event, true);
57168
57952
  if (!event.data.rangeSelection) {
57169
57953
  service._getDecorationLayer().clear();
@@ -57177,7 +57961,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57177
57961
  "name": "down",
57178
57962
  "supportedChartTypes": TimeLineAndComb
57179
57963
  },
57180
- "handler": function(event, service) {
57964
+ "handler": function (event, service) {
57181
57965
  DPBhvrHdlr.updateRangeEffect(event, service);
57182
57966
  }
57183
57967
  }, {
@@ -57187,7 +57971,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForLine',[
57187
57971
  "name": "up",
57188
57972
  "supportedChartTypes": TimeLineAndComb
57189
57973
  },
57190
- "handler": function(event, service) {
57974
+ "handler": function (event, service) {
57191
57975
  DPBhvrHdlr.recoverRangeEffect(event, service);
57192
57976
  }
57193
57977
  }];
@@ -76858,6 +77642,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76858
77642
 
76859
77643
  var elements = HighlightHelper.turnToArray(event.data.targets);
76860
77644
  var propMgr = service.getProperties();
77645
+ var isAccEnable = propMgr.get('interaction.enableAccUpdates');
76861
77646
  var prop = propMgr.get('interaction.hover');
76862
77647
  var hoverPaddingWidth = 2;
76863
77648
  var hoverBorderWidth = parseFloat(HighlightHelper.getWidth(prop.stroke.width, 2));
@@ -76867,6 +77652,10 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76867
77652
 
76868
77653
  if ((d3.select(e).classed(CSS_CLASS.DATAPOINTSELECTED) && !DataGraphics.getData(e).isZeroValue) ||
76869
77654
  !prop.stroke.visible || hoverBorderWidth === 0) {
77655
+ if(isAccEnable) {
77656
+ e.firstChild.setAttribute('stroke', 'none');
77657
+ e.firstChild.setAttribute("stroke-width", null);
77658
+ }
76870
77659
  return;
76871
77660
  }
76872
77661
 
@@ -76920,6 +77709,10 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76920
77709
  newline.setAttribute("stroke-width", parseFloat(prop.stroke.width) / 2 + "px");
76921
77710
  newline.setAttribute("stroke-dasharray", dasharray);
76922
77711
  zeroValueHoverNode.appendChild(newline);
77712
+ if(isAccEnable) {
77713
+ e.firstChild.setAttribute('stroke', 'none');
77714
+ e.firstChild.setAttribute("stroke-width", null);
77715
+ }
76923
77716
  e.parentNode.appendChild(zeroValueHoverNode);
76924
77717
  } else {
76925
77718
  var newPath = SVG.create("path");
@@ -76939,6 +77732,10 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76939
77732
  startAngle(startAngle + extraRadius).endAngle(endAngle - extraRadius)();
76940
77733
  }
76941
77734
  newPath.setAttribute("d", pathD);
77735
+ if(isAccEnable) {
77736
+ e.firstChild.setAttribute('stroke', 'none');
77737
+ e.firstChild.setAttribute("stroke-width", null);
77738
+ }
76942
77739
  e.appendChild(newPath);
76943
77740
  }
76944
77741
  });
@@ -76967,6 +77764,8 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76967
77764
  d3.select(parentNode).selectAll('.' + CSS_CLASS.ZEROVALUEHOVER).remove();
76968
77765
  var elements = HighlightHelper.turnToArray(event.data.targets);
76969
77766
  var prop;
77767
+ var propMgr = service.getProperties();
77768
+ var isAccEnable = propMgr.get('interaction.enableAccUpdates');
76970
77769
  elements.forEach(function(e) {
76971
77770
  d3.select(e).selectAll("." + CSS_CLASS.PIE_HOVER_STROKE).remove();
76972
77771
 
@@ -76980,6 +77779,10 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForPie',[
76980
77779
  prop = service.getProperties().get('plotArea.dataPoint');
76981
77780
  }
76982
77781
  }
77782
+ if(isAccEnable && prop.stroke.visible) {
77783
+ e.firstChild.setAttribute('stroke', prop.stroke.color);
77784
+ e.firstChild.setAttribute("stroke-width", prop.stroke.width || 1);
77785
+ }
76983
77786
  HighlightHelper.drawStroke(service, e, 'path', prop.stroke, 1);
76984
77787
  HighlightHelper.drawFill(service, e, 'path', prop,
76985
77788
  TypeUtils.isExist(service.getProperties().get('plotArea.markerRenderer')));
@@ -77316,18 +78119,16 @@ define('sap/viz/chart/components/renderers/TreeMapDimensionLabelRenderer',["sap/
77316
78119
  color = props.dimensionLabel.style.color;
77317
78120
  } else {
77318
78121
  if (config.isLeafItem) {
78122
+ var accFontColor = ACCStyleUtils.getTextColor(bgColor);
78123
+ var fontColor = ColorUtil.getDataLabelColor(bgColor);
77319
78124
  if (props.dataLabel.visible && props.dataLabel.style.color) {
77320
78125
  if(props.dataLabel.style.colorRange === 'outside'){
77321
- color = enableAcc ? ACCStyleUtils.getTextColor(bgColor)
77322
- :
77323
- ColorUtil.getDataLabelColor(bgColor);
78126
+ color = enableAcc ? accFontColor || fontColor : fontColor;
77324
78127
  }else{
77325
78128
  color = props.dataLabel.style.color;
77326
78129
  }
77327
78130
  } else {
77328
- color = enableAcc ? ACCStyleUtils.getTextColor(bgColor)
77329
- :
77330
- ColorUtil.getDataLabelColor(bgColor);
78131
+ color = enableAcc ? accFontColor || fontColor : fontColor;
77331
78132
  }
77332
78133
  } else {
77333
78134
  color = textColor(config);
@@ -77355,7 +78156,7 @@ define('sap/viz/chart/components/renderers/TreeMapDimensionLabelRenderer',["sap/
77355
78156
  label.setAttribute("font-family", labelStyle.fontFamily);
77356
78157
  label.setAttribute('fill-opacity', 1);
77357
78158
  label.setAttribute('aria-hidden','true');
77358
- if (config.enableAcc) {
78159
+ if (config.enableAcc && textShadow) {
77359
78160
  label.setAttribute('style', "text-shadow:" + textShadow + ";");
77360
78161
  }
77361
78162
  label.value = config.data.label;
@@ -78437,7 +79238,8 @@ define('sap/viz/chart/components/plots/treemap/TreeMapPlot',[
78437
79238
  'sap/viz/chart/components/renderers/TreeMapDimensionLabelRenderer',
78438
79239
  "sap/viz/chart/components/accessibility/ChartComponentNavigatorFactory",
78439
79240
  "sap/viz/chart/components/accessibility/TreeMapDataPointNavigator",
78440
- "sap/viz/chart/components/util/ChartConstants"
79241
+ "sap/viz/chart/components/util/ChartConstants",
79242
+ "sap/viz/framework/common/util/ACCStyleUtils"
78441
79243
  ], function Setup(oo,
78442
79244
  TypeUtils,
78443
79245
  TextUtils,
@@ -78456,7 +79258,8 @@ define('sap/viz/chart/components/plots/treemap/TreeMapPlot',[
78456
79258
  TreeMapDimensionLabelRenderer,
78457
79259
  ChartNavigator,
78458
79260
  DataPointNavigator,
78459
- ChartConstants) {
79261
+ ChartConstants,
79262
+ ACCStyleUtils) {
78460
79263
 
78461
79264
  var m_className = "v-treemap",
78462
79265
  m_classNameItem = "v-treemapitem",
@@ -78613,6 +79416,24 @@ define('sap/viz/chart/components/plots/treemap/TreeMapPlot',[
78613
79416
  }
78614
79417
  };
78615
79418
 
79419
+ TreeMapPlot.prototype._buildWrapperConfig = function (data, position, context, option) {
79420
+ var config = TreeMapPlot.superclass._buildWrapperConfig.apply(this, arguments);
79421
+
79422
+ var enableAccUpdates = this._properties.origin.get('interaction.enableAccUpdates') || false;
79423
+ if (enableAccUpdates) {
79424
+ config.graphic.innerStroke = {
79425
+ color: ACCStyleUtils.getBorderColor(config.graphic.fill),
79426
+ width: ACCStyleUtils.getBorderWidth(),
79427
+ visible: true,
79428
+ rectDifference: 2,
79429
+ x: 0,
79430
+ y: 0
79431
+ };
79432
+ }
79433
+
79434
+ return config;
79435
+ };
79436
+
78616
79437
  function setupItems(gItems, plot, option){
78617
79438
  gItems.each(function(d) {
78618
79439
  var dpConfig = plot._buildWrapperConfig(d.rawdata, {width:d.width, height:d.height}, d.ctx, option);
@@ -78620,7 +79441,11 @@ define('sap/viz/chart/components/plots/treemap/TreeMapPlot',[
78620
79441
  d.color = dpData.color;
78621
79442
  DataGraphics.setData(this, dpData);
78622
79443
  DataPointUtils.setDataPointId(this, d.rawdata.dp.id);
78623
- });
79444
+ d.innerStrokeConfig = (dpConfig &&
79445
+ dpConfig.graphic &&
79446
+ dpConfig.graphic.innerStroke &&
79447
+ dpConfig.graphic.innerStroke.visible) ? dpConfig : null;
79448
+ });
78624
79449
  }
78625
79450
 
78626
79451
  TreeMapPlot.prototype._drawTreeMapItems = function(treeLevelRoot, rectObjs, redrawAll, iLevel,
@@ -78686,6 +79511,7 @@ define('sap/viz/chart/components/plots/treemap/TreeMapPlot',[
78686
79511
  });
78687
79512
  return rectRes;
78688
79513
  };
79514
+ var innerStrokeNodes = [];
78689
79515
  var drawRect = function(rect) {
78690
79516
  var rectRes = rect.attr("x", function(d) {
78691
79517
  return (isLeafItem) ? (0) : (d.left + padding);
@@ -78710,6 +79536,13 @@ define('sap/viz/chart/components/plots/treemap/TreeMapPlot',[
78710
79536
  .attr('stroke-width', function(d) {
78711
79537
  return isLeafItem ? d.strokeWidth : undefined;
78712
79538
  });
79539
+ rectRes.each(function (d) {
79540
+ var rectNode = this;
79541
+ if (isLeafItem && iLevel > 0 && d.innerStrokeConfig) {
79542
+ rectNode._innerStrokeConfig = d.innerStrokeConfig;
79543
+ innerStrokeNodes.push(rectNode);
79544
+ }
79545
+ });
78713
79546
  if (!isLeafItem) {
78714
79547
  rectRes.attr("fill-opacity", 1);
78715
79548
  }
@@ -78793,6 +79626,12 @@ define('sap/viz/chart/components/plots/treemap/TreeMapPlot',[
78793
79626
  }
78794
79627
  //add labels
78795
79628
  drawLabels(gItems, this._labelVisibility);
79629
+ innerStrokeNodes.forEach(function (rectNode) {
79630
+ if (rectNode._innerStrokeConfig) {
79631
+ ACCStyleUtils.renderInnerStroke(rectNode._innerStrokeConfig, rectNode);
79632
+ delete rectNode._innerStrokeConfig;
79633
+ }
79634
+ });
78796
79635
  }
78797
79636
 
78798
79637
  //draw children recursively
@@ -80974,6 +81813,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForTreeMap',[
80974
81813
  var treeType = [
80975
81814
  "info/treemap"
80976
81815
  ];
81816
+ var rectCache = {};
80977
81817
  treeType = ChartTypeUtils.addTrellisType(treeType);
80978
81818
  var CSS_CLASS = Constants.CSS.CLASS;
80979
81819
 
@@ -81029,6 +81869,7 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForTreeMap',[
81029
81869
  var elements = HighlightHelper.turnToArray(event.data.targets);
81030
81870
  var prop = service.getProperties().get('interaction.hover');
81031
81871
  elements.forEach(function(e) {
81872
+ HighlightHelper.setRectCache(e, rectCache);
81032
81873
  if (!event.data.byKeyboard) {
81033
81874
  HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, 2);
81034
81875
  }
@@ -81060,7 +81901,9 @@ define('sap/viz/chart/behavior/config/DataPointBehaviorConfigForTreeMap',[
81060
81901
  HighlightHelper.drawStroke(service, e, 'rect', prop.stroke, 1);
81061
81902
  HighlightHelper.drawFill(service, e, 'rect', prop,
81062
81903
  TypeUtils.isExist(service.getProperties().get('plotArea.markerRenderer')));
81904
+ HighlightHelper.mergeRectContent(e, rectCache);
81063
81905
  });
81906
+ HighlightHelper.resetRectCache(rectCache);
81064
81907
  }
81065
81908
  }, {
81066
81909
  "id": "clearPlot_tree",
@@ -81741,6 +82584,17 @@ define('sap/viz/chart/components/plots/HeatMapPlot',[
81741
82584
  effectManager: this._effectManager,
81742
82585
  categoryAxis : dpConfig.categoryAxis
81743
82586
  };
82587
+ var enableAccUpdates = this._properties.origin.get('interaction.enableAccUpdates') || false;
82588
+ if (enableAccUpdates) {
82589
+ config.graphic.innerStroke = {
82590
+ color: ACCStyleUtils.getBorderColor(config.graphic.fill),
82591
+ width: ACCStyleUtils.getBorderWidth(),
82592
+ visible: true,
82593
+ rectDifference: 1,
82594
+ x: 0.5,
82595
+ y: 0.5
82596
+ };
82597
+ }
81744
82598
  if(this._strokeProp && this._strokeProp.visible && config.graphic) {
81745
82599
  config.graphic.stroke = this._strokeProp.color;
81746
82600
  config.graphic.strokeWidth = '1px';
@@ -81873,7 +82727,8 @@ define('sap/viz/chart/components/plots/HeatMapPlot',[
81873
82727
  var textShadow = null;
81874
82728
  if (enableAccUpdates) {
81875
82729
  var referColor = context.referColor || context.background;
81876
- fontColor = ACCStyleUtils.getTextColor(referColor);
82730
+ var accFontColor = ACCStyleUtils.getTextColor(referColor);
82731
+ fontColor = accFontColor? accFontColor : fontColor;
81877
82732
  textShadow = ACCStyleUtils.getTextShadowStyle(referColor);
81878
82733
  }
81879
82734
 
@@ -81929,6 +82784,7 @@ define('sap/viz/chart/components/plots/HeatMapPlot',[
81929
82784
  }
81930
82785
  }
81931
82786
 
82787
+
81932
82788
  var selection = d3.select(textNode)
81933
82789
  .attr("font-size", fontSize)
81934
82790
  .attr("font-weight", fontWeight)
@@ -81989,6 +82845,7 @@ define('sap/viz/chart/components/plots/HeatMapPlot',[
81989
82845
  var options = {
81990
82846
  disableSemantic: false
81991
82847
  };
82848
+ var innerStrokeNodes = [];
81992
82849
  for(dpNum = 0; dpNum < dpConfigArray.length; dpNum++){
81993
82850
  dpConfig = dpConfigArray[dpNum];
81994
82851
  dpConfig.options = options;
@@ -82004,8 +82861,18 @@ define('sap/viz/chart/components/plots/HeatMapPlot',[
82004
82861
  Constants.CSS.CLASS.MORPHABLEDATAPOINT + ' ' + Constants.CSS.CLASS.DATAPOINTDEFAULT);
82005
82862
  dpTranslateNode.setAttribute("transform", 'translate(' + dpConfig.x + "," + dpConfig.y + ')');
82006
82863
  dataPointG.appendChild(dpTranslateNode);
82864
+ var rectNode = dpTranslateNode.querySelector("rect");
82865
+ if (rectNode && rectNode._innerStrokeConfig) {
82866
+ innerStrokeNodes.push(rectNode);
82867
+ }
82007
82868
  }
82008
82869
  selection.node().appendChild(dataPointG);
82870
+ innerStrokeNodes.forEach(function(rectNode) {
82871
+ if (rectNode._innerStrokeConfig) {
82872
+ ACCStyleUtils.renderInnerStroke(rectNode._innerStrokeConfig, rectNode);
82873
+ delete rectNode._innerStrokeConfig;
82874
+ }
82875
+ });
82009
82876
  this._drawHeatMapDataLabels(selection);
82010
82877
  };
82011
82878