@syncfusion/ej2-charts
Advanced tools
Comparing version 16.3.32 to 16.3.33
@@ -13,4 +13,17 @@ <!-- markdownlint-disable MD010 --> | ||
#### New Features | ||
- Margin options are added to legend. | ||
#### Bug Fixes | ||
- Series DataSource change chart refresh issue fixed. | ||
- Axis label is now rendering properly, when we have the interval in decimals. | ||
## 16.3.32 (2018-11-13) | ||
### Chart | ||
#### Bug Fixes | ||
- Polar area type border closing issue fixed. | ||
@@ -17,0 +30,0 @@ - scrollbar inverted axis position issue fixed. |
/*! | ||
* filename: index.d.ts | ||
* version : 16.3.32 | ||
* version : 16.3.33 | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"name": "@syncfusion/ej2-charts", | ||
"version": "16.3.32", | ||
"version": "16.3.33", | ||
"description": "Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball.", | ||
@@ -8,10 +8,10 @@ "author": "Syncfusion Inc.", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~16.3.32", | ||
"@syncfusion/ej2-data": "~16.3.30", | ||
"@syncfusion/ej2-svg-base": "~16.3.30", | ||
"@syncfusion/ej2-pdf-export": "~16.3.30", | ||
"@syncfusion/ej2-file-utils": "~16.3.30", | ||
"@syncfusion/ej2-compression": "~16.3.32", | ||
"@syncfusion/ej2-navigations": "~16.3.30", | ||
"@syncfusion/ej2-calendars": "~16.3.31" | ||
"@syncfusion/ej2-base": "~16.3.33", | ||
"@syncfusion/ej2-data": "~16.3.33", | ||
"@syncfusion/ej2-svg-base": "~16.3.33", | ||
"@syncfusion/ej2-pdf-export": "~16.3.33", | ||
"@syncfusion/ej2-file-utils": "~16.3.33", | ||
"@syncfusion/ej2-compression": "~16.3.33", | ||
"@syncfusion/ej2-navigations": "~16.3.33", | ||
"@syncfusion/ej2-calendars": "~16.3.33" | ||
}, | ||
@@ -38,3 +38,3 @@ "devDependencies": { | ||
"type": "git", | ||
"url": "https://github.com/syncfusion/ej2-charts.git" | ||
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/charts" | ||
}, | ||
@@ -41,0 +41,0 @@ "main": "./dist/ej2-charts.umd.min.js", |
@@ -43,5 +43,5 @@ # ej2-charts | ||
These components are available in following list of | ||
1. [Angular](https://github.com/syncfusion/ej2-angular-ui-components/?utm_source=npm&utm_campaign=chart) | ||
2. [React](https://github.com/syncfusion/ej2-react-ui-components/?utm_source=npm&utm_campaign=chart) | ||
3. [Vue.js](https://github.com/syncfusion/ej2-vue-ui-components/?utm_source=npm&utm_campaign=chart) | ||
1. [Angular](https://github.com/syncfusion/ej2-angular-ui-components/tree/master/components/charts?utm_source=npm&utm_campaign=chart) | ||
2. [React](https://github.com/syncfusion/ej2-react-ui-components/tree/master/components/charts?utm_source=npm&utm_campaign=chart) | ||
3. [Vue.js](https://github.com/syncfusion/ej2-vue-ui-components/tree/master/components/charts?utm_source=npm&utm_campaign=chart) | ||
4. [ASP.NET Core](https://aspdotnetcore.syncfusion.com/Chart/Line#/material) | ||
@@ -48,0 +48,0 @@ 5. [ASP.NET MVC](https://aspnetmvc.syncfusion.com/Chart/Line#/material) |
@@ -243,2 +243,7 @@ import { getMinPointsDelta, getActualDesiredIntervalsCount, setRange, triggerLabelRender } from '../../common/utils/helper'; | ||
var isCustom = format.match('{value}') !== null; | ||
var intervalDigits = 0; | ||
var formatDigits = 0; | ||
if (axis.labelFormat && axis.labelFormat.indexOf('n') > -1) { | ||
formatDigits = parseInt(axis.labelFormat.substring(1, axis.labelFormat.length), 10); | ||
} | ||
axis.format = chart.intl.getNumberFormat({ | ||
@@ -250,4 +255,7 @@ format: isCustom ? '' : format, | ||
axis.endLabel = axis.format(axis.visibleRange.max); | ||
if (axis.visibleRange.interval && (axis.visibleRange.interval + '').indexOf('.') >= 0) { | ||
intervalDigits = (axis.visibleRange.interval + '').split('.')[1].length; | ||
} | ||
labelStyle = (extend({}, getValue('properties', axis.labelStyle), null, true)); | ||
for (; tempInterval <= axis.visibleRange.max; tempInterval += axis.visibleRange.interval) { | ||
labelStyle = (extend({}, getValue('properties', axis.labelStyle), null, true)); | ||
if (withIn(tempInterval, axis.visibleRange)) { | ||
@@ -257,2 +265,9 @@ triggerLabelRender(chart, tempInterval, this.formatValue(axis, isCustom, format, tempInterval), labelStyle, axis); | ||
} | ||
if (tempInterval && (tempInterval + '').indexOf('.') >= 0 && (tempInterval + '').split('.')[1].length > 10) { | ||
tempInterval = (tempInterval + '').split('.')[1].length > (formatDigits || intervalDigits) ? | ||
+tempInterval.toFixed(formatDigits || intervalDigits) : tempInterval; | ||
if (tempInterval <= axis.visibleRange.max) { | ||
triggerLabelRender(chart, tempInterval, this.formatValue(axis, isCustom, format, tempInterval), labelStyle, axis); | ||
} | ||
} | ||
if (axis.getMaxLabelWidth) { | ||
@@ -259,0 +274,0 @@ axis.getMaxLabelWidth(this.chart); |
@@ -1101,2 +1101,6 @@ import { Component, Internationalization } from '@syncfusion/ej2-base'; | ||
/** | ||
* Get visible series by index | ||
*/ | ||
private getVisibleSeries; | ||
/** | ||
* Called internally if any of the property value changed. | ||
@@ -1103,0 +1107,0 @@ * @private |
@@ -1,2 +0,2 @@ | ||
import { Property, Complex, ChildProperty} from '@syncfusion/ej2-base';import { Chart } from '../../chart';import { Font, Border } from '../model/base';import { Theme } from '../model/theme';import { FontModel, BorderModel } from '../model/base-model';import { Size, Rect, subtractThickness, Thickness, drawSymbol, measureText, ChartLocation, PathOption } from '../utils/helper';import { RectOption, TextOption, textElement, stringToNumber } from '../utils/helper';import { removeElement, showTooltip, getElement, appendChildElement } from '../utils/helper';import { LegendPosition, LegendShape, ChartSeriesType, ChartShape } from '../../chart/utils/enum';import { Legend } from '../../chart/legend/legend';import { AccumulationType } from '../../accumulation-chart/model/enum';import { AccumulationChart } from '../../accumulation-chart/accumulation';import { AccumulationLegend } from '../../accumulation-chart/renderer/legend';import { Alignment } from '../utils/enum'; | ||
import { Property, Complex, ChildProperty} from '@syncfusion/ej2-base';import { Chart } from '../../chart';import { Font, Border, Margin } from '../model/base';import { Theme } from '../model/theme';import { MarginModel, FontModel, BorderModel } from '../model/base-model';import { Size, Rect, subtractThickness, Thickness, drawSymbol, measureText, ChartLocation, PathOption } from '../utils/helper';import { RectOption, TextOption, textElement, stringToNumber } from '../utils/helper';import { removeElement, showTooltip, getElement, appendChildElement } from '../utils/helper';import { LegendPosition, LegendShape, ChartSeriesType, ChartShape } from '../../chart/utils/enum';import { Legend } from '../../chart/legend/legend';import { AccumulationType } from '../../accumulation-chart/model/enum';import { AccumulationChart } from '../../accumulation-chart/accumulation';import { AccumulationLegend } from '../../accumulation-chart/renderer/legend';import { Alignment } from '../utils/enum'; | ||
@@ -116,2 +116,8 @@ /** | ||
/** | ||
* Options to customize left, right, top and bottom margins of the chart. | ||
*/ | ||
margin?: MarginModel; | ||
/** | ||
* Padding between the legend shape and text. | ||
@@ -118,0 +124,0 @@ * @default 5 |
import { ChildProperty } from '@syncfusion/ej2-base'; | ||
import { Chart } from '../../chart'; | ||
import { LegendSettingsModel, LocationModel } from './legend-model'; | ||
import { FontModel, BorderModel } from '../model/base-model'; | ||
import { MarginModel, FontModel, BorderModel } from '../model/base-model'; | ||
import { Size, Rect, ChartLocation } from '../utils/helper'; | ||
@@ -109,2 +109,6 @@ import { LegendPosition, LegendShape, ChartSeriesType, ChartShape } from '../../chart/utils/enum'; | ||
/** | ||
* Options to customize left, right, top and bottom margins of the chart. | ||
*/ | ||
margin: MarginModel; | ||
/** | ||
* Padding between the legend shape and text. | ||
@@ -111,0 +115,0 @@ * @default 5 |
@@ -21,3 +21,3 @@ var __extends = (this && this.__extends) || (function () { | ||
import { Property, Complex, ChildProperty } from '@syncfusion/ej2-base'; | ||
import { Font, Border } from '../model/base'; | ||
import { Font, Border, Margin } from '../model/base'; | ||
import { Theme } from '../model/theme'; | ||
@@ -86,2 +86,5 @@ import { Size, Rect, subtractThickness, Thickness, drawSymbol, measureText, ChartLocation, PathOption } from '../utils/helper'; | ||
__decorate([ | ||
Complex({ left: 0, right: 0, top: 0, bottom: 0 }, Margin) | ||
], LegendSettings.prototype, "margin", void 0); | ||
__decorate([ | ||
Property(5) | ||
@@ -182,8 +185,8 @@ ], LegendSettings.prototype, "shapePadding", void 0); | ||
var padding = this.legend.border.width; | ||
var legendHeight = legendBounds.height + padding; | ||
var legendWidth = legendBounds.width + padding; | ||
var legendHeight = legendBounds.height + padding + this.legend.margin.top + this.legend.margin.bottom; | ||
var legendWidth = legendBounds.width + padding + this.legend.margin.left + this.legend.margin.right; | ||
var marginBottom = this.chart.margin.bottom; | ||
if (position === 'Bottom') { | ||
legendBounds.x = this.alignLegend(legendBounds.x, availableSize.width, legendBounds.width, alignment); | ||
legendBounds.y = rect.y + (rect.height - legendHeight) + padding; | ||
legendBounds.y = rect.y + (rect.height - legendHeight) + padding + this.legend.margin.top; | ||
subtractThickness(rect, new Thickness(0, 0, 0, legendHeight)); | ||
@@ -193,7 +196,7 @@ } | ||
legendBounds.x = this.alignLegend(legendBounds.x, availableSize.width, legendBounds.width, alignment); | ||
legendBounds.y = rect.y + padding; | ||
legendBounds.y = rect.y + padding + this.legend.margin.top; | ||
subtractThickness(rect, new Thickness(0, 0, legendHeight, 0)); | ||
} | ||
else if (position === 'Right') { | ||
legendBounds.x = rect.x + (rect.width - legendBounds.width); | ||
legendBounds.x = rect.x + (rect.width - legendBounds.width) - this.legend.margin.right; | ||
legendBounds.y = rect.y + this.alignLegend(0, availableSize.height - (rect.y + marginBottom), legendBounds.height, alignment); | ||
@@ -203,2 +206,3 @@ subtractThickness(rect, new Thickness(0, legendWidth, 0, 0)); | ||
else if (position === 'Left') { | ||
legendBounds.x = legendBounds.x + this.legend.margin.left; | ||
legendBounds.y = rect.y + this.alignLegend(0, availableSize.height - (rect.y + marginBottom), legendBounds.height, alignment); | ||
@@ -205,0 +209,0 @@ subtractThickness(rect, new Thickness(legendWidth, 0, 0, 0)); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16486160
125927