Skip to content

Commit 82e8135

Browse files
author
pipeline
committed
v19.1.67 is released
1 parent e6620d7 commit 82e8135

File tree

200 files changed

+8212
-1151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+8212
-1151
lines changed

controls/barcodegenerator/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 19.1.66 (2021-06-01)
5+
## 19.1.67 (2021-06-08)
66

77
### Barcode
88

controls/base/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 19.1.66 (2021-06-01)
5+
## 19.1.67 (2021-06-08)
66

77
### Common
88

controls/calendars/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-calendars",
3-
"version": "19.1.64",
3+
"version": "19.1.66",
44
"description": "A complete package of date or time components with built-in features such as date formatting, inline editing, multiple (range) selection, range restriction, month and year selection, strict mode, and globalization.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/charts/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22

33
## [Unreleased]
44

5+
## 19.1.67 (2021-06-08)
6+
7+
### Chart
8+
9+
#### Bug Fixes
10+
11+
- `#F165670` - Marker Explode is now rendered properly with image.
12+
- `#328528` - Histogram is rendering properly when the `binInterval` value is 0.
13+
- `#328780` - `multiLevelLabelClick` event is now triggering in canvas mode.
14+
515
## 19.1.65 (2021-05-25)
616

717
### Chart
818

19+
### Stock Chart
20+
921
#### Bug Fixes
1022

1123
- `#F165171` - Tooltip for column in stock chart is working properly now.

controls/charts/spec/range-navigator/issue-fix/range-issue.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,15 @@ describe('Range Navigator Issue fixes', () => {
5959
rangeControl.series = [{ dataSource: new DataManager(data), xName: 'x', yName: 'y' }];
6060
rangeControl.refresh();
6161
});
62+
it('checking with background color', (done: Function) => {
63+
rangeControl.loaded = (args: IRangeLoadedEventArgs) => {
64+
rangeElement = document.getElementById('rangeContainer_ChartBorder');
65+
expect(rangeElement.getAttribute("fill")).toEqual("red");
66+
done();
67+
};
68+
rangeControl.background = 'red';
69+
rangeControl.refresh();
70+
});
71+
6272
});
6373
});

controls/charts/src/chart/axis/multi-level-labels.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Axis } from '../axis/axis';
1111
import { FontModel } from '../../common/model/base-model';
1212
import { isNullOrUndefined } from '@syncfusion/ej2-base';
1313
import { textWrap, appendClipElement, appendChildElement } from '../../common/utils/helper';
14-
import { valueToCoefficient, textTrim, textElement } from '../../common/utils/helper';
14+
import { valueToCoefficient, textTrim, textElement, withInBounds } from '../../common/utils/helper';
1515
import { Size, measureText, TextOption, PathOption, Rect, SvgRenderer } from '@syncfusion/ej2-svg-base';
1616
import { MultiLevelLabels, MultiLevelCategories } from '../model/chart-base';
1717
import { IAxisMultiLabelRenderEventArgs, IMultiLevelLabelClickEventArgs } from '../../chart/model/chart-interface';
@@ -38,6 +38,10 @@ export class MultiLevelLabel {
3838
public multiElements: Element;
3939
/** @private */
4040
public labelElement: Element;
41+
/** @private */
42+
public multiLevelLabelRectXRegion: Rect[] = [];
43+
/** @private */
44+
public xLabelCollection: TextOption[] = [];
4145
/**
4246
* Constructor for the logerithmic module.
4347
*
@@ -170,6 +174,11 @@ export class MultiLevelLabel {
170174
this.chart.renderer, options, argsData.textStyle, argsData.textStyle.color || this.chart.themeStyle.axisLabel,
171175
this.labelElement, false, this.chart.redraw, true, null, null, null, null, null, this.chart.enableCanvas
172176
);
177+
if (this.chart.enableCanvas) {
178+
let textSize: Size = measureText(argsData.text, argsData.textStyle);
179+
this.multiLevelLabelRectXRegion.push(new Rect(options.x, options.y, textSize.width, textSize.height));
180+
this.xLabelCollection.push(options);
181+
}
173182
if (multiLevel.border.width > 0 && multiLevel.border.type !== 'WithoutBorder') {
174183
pathRect = this.renderXAxisLabelBorder(
175184
level, endX - startX - padding, axis, startX, startY, labelSize, options, axisRect, argsData.alignment,
@@ -511,11 +520,20 @@ export class MultiLevelLabel {
511520
* @private
512521
*/
513522
public click(event: Event): void {
514-
const targetId: string = (<HTMLElement>event.target).id;
523+
let targetId: string = (<HTMLElement>event.target).id;
515524
const multiLevelID: string = '_Axis_MultiLevelLabel_Level_';
516525
let textId: string;
517526
let elementId: string;
518527
let axisIndex: number;
528+
if (this.chart.enableCanvas) {
529+
for (let i: number = 0; i < this.multiLevelLabelRectXRegion.length; i++) {
530+
if (withInBounds(
531+
event['x'], event['y'], this.multiLevelLabelRectXRegion[i],
532+
this.multiLevelLabelRectXRegion[i].width, this.multiLevelLabelRectXRegion[i].height)) {
533+
targetId = this.xLabelCollection[i].id;
534+
}
535+
}
536+
}
519537
if (targetId.indexOf(multiLevelID) > -1) {
520538
textId = targetId.split(multiLevelID)[1];
521539
elementId = targetId.split(multiLevelID)[0];

controls/charts/src/chart/series/histogram-series.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class HistogramSeries extends ColumnSeries {
4141
series.histogramValues.mean = mean;
4242
series.histogramValues.sDValue = Math.round(Math.sqrt(sumValue / yValues.length - 1));
4343
series.histogramValues.binWidth = series.binInterval ||
44-
Math.round((3.5 * series.histogramValues.sDValue) / Math.pow(yValues.length, 1 / 3));
44+
Math.round((3.5 * series.histogramValues.sDValue) / Math.pow(yValues.length, 1 / 3)) || 1;
4545
}
4646
/**
4747
* Add data points for Histogram series.

controls/charts/src/chart/series/marker-explode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export class MarkerExplode extends ChartData {
192192
i ? borderColor : markerShadow,
193193
(marker.opacity || seriesMarker.opacity), null, null
194194
);
195-
const symbol: Element = drawSymbol(location, shape, size, seriesMarker.imageUrl, options, '',
195+
const symbol: Element = drawSymbol(location, shape, size, marker.imageUrl, options, '',
196196
this.chart.svgRenderer, series.clipRect);
197197
// incident: 252450 point click selection not working while maker explode
198198
//symbol.setAttribute('style', 'pointer-events:none');

controls/charts/src/chart/series/marker.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export class Marker extends MarkerExplode {
121121
const markerHeight: number = argsData.point.marker.height || argsData.height;
122122
const markerOpacity: number = argsData.point.marker.opacity || marker.opacity;
123123
const markerShape: ChartShape = argsData.point.marker.shape || argsData.shape;
124+
const imageURL : string = argsData.point.marker.imageUrl || marker.imageUrl;
124125
shapeOption = new PathOption(
125126
symbolId, markerFill, markerBorder.width, markerBorder.color, markerOpacity, null
126127
);
@@ -136,7 +137,7 @@ export class Marker extends MarkerExplode {
136137
markerElement = drawSymbol(
137138
location, markerShape,
138139
new Size(markerWidth, markerHeight),
139-
marker.imageUrl, shapeOption,
140+
imageURL, shapeOption,
140141
point.x.toString() + ':' + y.toString(), this.chart.renderer, series.clipRect
141142
);
142143
appendChildElement(
@@ -146,7 +147,7 @@ export class Marker extends MarkerExplode {
146147
}
147148
point.marker = {
148149
border: markerBorder, fill: markerFill, height: markerHeight,
149-
visible: true, shape: markerShape, width: markerWidth
150+
visible: true, shape: markerShape, width: markerWidth, imageUrl: imageURL
150151
};
151152
} else {
152153
location = null;

controls/charts/src/chart/utils/get-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ export class ChartData {
210210
public getClosest(series: Series, value: number, xvalues?: number[]): number {
211211
let closest: number; let data: number;
212212
const xData: number[] = xvalues ? xvalues : series.xData;
213-
if (value >= <number>series.xAxis.visibleRange.min && value <= <number>series.xAxis.visibleRange.max) {
213+
if (value >= <number>series.xMin - 0.5 && value <= <number>series.xMax + 0.5) {
214214
for (let i: number = 0; i < xData.length; i++) {
215215
data = xData[i];
216216
if (closest == null || Math.abs(data - value) < Math.abs(closest - value)) {

0 commit comments

Comments
 (0)