conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
/**
* When using multiple axes, adjust the number of ticks to match the highest
* number of ticks in that group
*/
adjustTickAmount: function () {
var axis = this,
chart = axis.chart,
xOrY = axis.xOrY,
tickPositions = axis.tickPositions,
maxTicks = chart.maxTicks;
=======
/**
* Set the scale based on data min and max, user set min and max or options
*
*/
function setScale() {
var type,
i,
isDirtyData,
isDirtyAxisLength;
oldMin = min;
oldMax = max;
oldAxisLength = axisLength;
// set the new axisLength
axis.setAxisSize();
isDirtyAxisLength = axisLength !== oldAxisLength;
// is there new data?
each(axis.series, function (series) {
if (series.isDirtyData || series.isDirty ||
series.xAxis.isDirty) { // when x axis is dirty, we need new data extremes for y as well
isDirtyData = true;
}
});
// do we really need to go through all this?
if (isDirtyAxisLength || isDirtyData || isLinked ||
userMin !== oldUserMin || userMax !== oldUserMax) {
// get data extremes if needed
getSeriesExtremes();
>>>>>>>
/**
* When using multiple axes, adjust the number of ticks to match the highest
* number of ticks in that group
*/
adjustTickAmount: function () {
var axis = this,
chart = axis.chart,
xOrY = axis.xOrY,
tickPositions = axis.tickPositions,
maxTicks = chart.maxTicks;
<<<<<<<
selectionBox = mouseTracker.selectionMarker.getBBox(),
selectionLeft = selectionBox.x - chart.plotLeft,
selectionTop = selectionBox.y - chart.plotTop;
=======
selectionBox = selectionMarker.getBBox(),
selectionLeft = selectionBox.x - plotLeft,
selectionTop = selectionBox.y - plotTop,
runZoom;
>>>>>>>
selectionBox = mouseTracker.selectionMarker.getBBox(),
selectionLeft = selectionBox.x - chart.plotLeft,
selectionTop = selectionBox.y - chart.plotTop,
runZoom;
<<<<<<<
fireEvent(chart, 'selection', selectionData, function (args) { chart.zoom(args); });
=======
if (runZoom) {
fireEvent(chart, 'selection', selectionData, zoom);
}
>>>>>>>
if (runZoom) {
fireEvent(chart, 'selection', selectionData, function (args) { chart.zoom(args); });
} |
<<<<<<<
point.plotY = plotY = (typeof yValue === 'number' && yValue !== Infinity) ?
Math.min(Math.max(-1e5, yAxis.translate(yValue, 0, 1, 0, 1)), 1e5) : // #3201
undefined;
point.isInside = plotY !== undefined && plotY >= 0 && plotY <= yAxis.len && // #3519
=======
point.plotY = plotY = !point.isNull ?
mathMin(mathMax(-1e5, yAxis.translate(yValue, 0, 1, 0, 1)), 1e5) : // #3201
UNDEFINED;
point.isInside = plotY !== UNDEFINED && plotY >= 0 && plotY <= yAxis.len && // #3519
>>>>>>>
point.plotY = plotY = !point.isNull ?
Math.min(Math.max(-1e5, yAxis.translate(yValue, 0, 1, 0, 1)), 1e5) : // #3201
undefined;
point.isInside = plotY !== undefined && plotY >= 0 && plotY <= yAxis.len && // #3519
<<<<<<<
// Determine auto enabling of markers (#3635)
if (i) {
closestPointRangePx = Math.min(closestPointRangePx, Math.abs(plotX - lastPlotX));
=======
// Determine auto enabling of markers (#3635, #5099)
if (!point.isNull) {
if (lastPlotX !== undefined) {
closestPointRangePx = mathMin(closestPointRangePx, mathAbs(plotX - lastPlotX));
}
lastPlotX = plotX;
>>>>>>>
// Determine auto enabling of markers (#3635, #5099)
if (!point.isNull) {
if (lastPlotX !== undefined) {
closestPointRangePx = Math.min(closestPointRangePx, Math.abs(plotX - lastPlotX));
}
lastPlotX = plotX;
<<<<<<<
pointAttribs: function (point, state) {
var seriesMarkerOptions = this.options.marker,
seriesStateOptions,
pointMarkerOptions = (point && point.options && point.options.marker) || {},
pointStateOptions,
strokeWidth = seriesMarkerOptions.lineWidth,
color = this.color,
pointColorOption = point && point.options.color,
pointColor = point && point.color,
zoneColor,
fill,
stroke,
zone;
if (point && this.zones.length) {
zone = point.getZone();
if (zone && zone.color) {
zoneColor = zone.color;
}
}
=======
getAttribs: function () {
var series = this,
seriesOptions = series.options,
normalOptions = defaultPlotOptions[series.type].marker ? seriesOptions.marker : seriesOptions,
stateOptions = normalOptions.states,
stateOptionsHover = stateOptions[HOVER_STATE],
pointStateOptionsHover,
seriesColor = series.color,
seriesNegativeColor = series.options.negativeColor,
normalDefaults = {
stroke: seriesColor,
fill: seriesColor
},
points = series.points || [], // #927
i,
j,
threshold,
point,
seriesPointAttr = [],
pointAttr,
pointAttrToOptions = series.pointAttrToOptions,
hasPointSpecificOptions = series.hasPointSpecificOptions,
defaultLineColor = normalOptions.lineColor,
defaultFillColor = normalOptions.fillColor,
turboThreshold = seriesOptions.turboThreshold,
zones = series.zones,
zoneAxis = series.zoneAxis || 'y',
attr,
key;
// series type specific modifications
if (seriesOptions.marker) { // line, spline, area, areaspline, scatter
// if no hover radius is given, default to normal radius + 2
stateOptionsHover.radius = stateOptionsHover.radius || normalOptions.radius + stateOptionsHover.radiusPlus;
stateOptionsHover.lineWidth = stateOptionsHover.lineWidth || normalOptions.lineWidth + stateOptionsHover.lineWidthPlus;
} else { // column, bar, pie
// if no hover color is given, brighten the normal color
stateOptionsHover.color = stateOptionsHover.color ||
Color(stateOptionsHover.color || seriesColor)
.brighten(stateOptionsHover.brightness).get();
// if no hover negativeColor is given, brighten the normal negativeColor
stateOptionsHover.negativeColor = stateOptionsHover.negativeColor ||
Color(stateOptionsHover.negativeColor || seriesNegativeColor)
.brighten(stateOptionsHover.brightness).get();
}
// general point attributes for the series normal state
seriesPointAttr[NORMAL_STATE] = series.convertAttribs(normalOptions, normalDefaults);
// HOVER_STATE and SELECT_STATE states inherit from normal state except the default radius
each([HOVER_STATE, SELECT_STATE], function (state) {
seriesPointAttr[state] =
series.convertAttribs(stateOptions[state], seriesPointAttr[NORMAL_STATE]);
});
// set it
series.pointAttr = seriesPointAttr;
// Generate the point-specific attribute collections if specific point
// options are given. If not, create a referance to the series wide point
// attributes
i = points.length;
if (!turboThreshold || i < turboThreshold || hasPointSpecificOptions) {
while (i--) {
point = points[i];
normalOptions = (point.options && point.options.marker) || point.options;
if (normalOptions && normalOptions.enabled === false) {
normalOptions.radius = 0;
}
if (zones.length) {
j = 0;
threshold = zones[j];
while (point[zoneAxis] >= threshold.value) {
threshold = zones[++j];
}
point.color = point.fillColor = pick(threshold.color, series.color); // #3636, #4267, #4430 - inherit color from series, when color is undefined
}
hasPointSpecificOptions = seriesOptions.colorByPoint || point.color; // #868
// check if the point has specific visual options
if (point.options) {
for (key in pointAttrToOptions) {
if (defined(normalOptions[pointAttrToOptions[key]])) {
hasPointSpecificOptions = true;
}
}
}
// a specific marker config object is defined for the individual point:
// create it's own attribute collection
if (hasPointSpecificOptions) {
normalOptions = normalOptions || {};
pointAttr = [];
stateOptions = normalOptions.states || {}; // reassign for individual point
pointStateOptionsHover = stateOptions[HOVER_STATE] = stateOptions[HOVER_STATE] || {};
// Handle colors for column and pies
if (!seriesOptions.marker || (point.negative && !pointStateOptionsHover.fillColor && !stateOptionsHover.fillColor)) { // column, bar, point or negative threshold for series with markers (#3636)
// If no hover color is given, brighten the normal color. #1619, #2579
pointStateOptionsHover[series.pointAttrToOptions.fill] = pointStateOptionsHover.color || (!point.options.color && stateOptionsHover[(point.negative && seriesNegativeColor ? 'negativeColor' : 'color')]) ||
Color(point.color)
.brighten(pointStateOptionsHover.brightness || stateOptionsHover.brightness)
.get();
}
// normal point state inherits series wide normal state
attr = { color: point.color }; // #868
if (!defaultFillColor) { // Individual point color or negative color markers (#2219)
attr.fillColor = point.color;
}
if (!defaultLineColor) {
attr.lineColor = point.color; // Bubbles take point color, line markers use white
}
// Color is explicitly set to null or undefined (#1288, #4068)
if (normalOptions.hasOwnProperty('color') && !normalOptions.color) {
delete normalOptions.color;
}
pointAttr[NORMAL_STATE] = series.convertAttribs(extend(attr, normalOptions), seriesPointAttr[NORMAL_STATE]);
// inherit from point normal and series hover
pointAttr[HOVER_STATE] = series.convertAttribs(
stateOptions[HOVER_STATE],
seriesPointAttr[HOVER_STATE],
pointAttr[NORMAL_STATE]
);
// inherit from point normal and series hover
pointAttr[SELECT_STATE] = series.convertAttribs(
stateOptions[SELECT_STATE],
seriesPointAttr[SELECT_STATE],
pointAttr[NORMAL_STATE]
);
>>>>>>>
pointAttribs: function (point, state) {
var seriesMarkerOptions = this.options.marker,
seriesStateOptions,
pointMarkerOptions = (point && point.options && point.options.marker) || {},
pointStateOptions,
strokeWidth = seriesMarkerOptions.lineWidth,
color = this.color,
pointColorOption = point && point.options.color,
pointColor = point && point.color,
zoneColor,
fill,
stroke,
zone;
if (point && this.zones.length) {
zone = point.getZone();
if (zone && zone.color) {
zoneColor = zone.color;
}
} |
<<<<<<<
=======
//defaultPlotOptions.line = merge(defaultSeriesOptions);
defaultPlotOptions.spline = merge(defaultSeriesOptions);
defaultPlotOptions.scatter = merge(defaultSeriesOptions, {
lineWidth: 0,
states: {
hover: {
lineWidth: 0
}
},
tooltip: {
headerFormat: '<span style="font-size: 10px; color:{series.color}">{series.name}</span><br/>',
pointFormat: 'x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>'
}
});
defaultPlotOptions.area = merge(defaultSeriesOptions, {
threshold: 0
// lineColor: null, // overrides color, but lets fillColor be unaltered
// fillOpacity: 0.75,
// fillColor: null
});
defaultPlotOptions.areaspline = merge(defaultPlotOptions.area);
defaultPlotOptions.column = merge(defaultSeriesOptions, {
borderColor: '#FFFFFF',
borderWidth: 1,
borderRadius: 0,
//colorByPoint: undefined,
groupPadding: 0.2,
marker: null, // point options are specified in the base options
pointPadding: 0.1,
//pointWidth: null,
minPointLength: 0,
cropThreshold: 50, // when there are more points, they will not animate out of the chart on xAxis.setExtremes
pointRange: null, // null means auto, meaning 1 in a categorized axis and least distance between points if not categories
states: {
hover: {
brightness: 0.1,
shadow: false
},
select: {
color: '#C0C0C0',
borderColor: '#000000',
shadow: false
}
},
dataLabels: {
y: null,
verticalAlign: null
},
threshold: 0
});
defaultPlotOptions.bar = merge(defaultPlotOptions.column, {
dataLabels: {
align: 'left',
x: 5,
y: null,
verticalAlign: 'middle'
}
});
defaultPlotOptions.pie = merge(defaultSeriesOptions, {
//dragType: '', // n/a
borderColor: '#FFFFFF',
borderWidth: 1,
center: ['50%', '50%'],
colorByPoint: true, // always true for pies
dataLabels: {
// align: null,
// connectorWidth: 1,
// connectorColor: point.color,
// connectorPadding: 5,
distance: 30,
enabled: true,
formatter: function () {
return this.point.name;
},
// softConnector: true,
y: 5
},
//innerSize: 0,
legendType: 'point',
marker: null, // point options are specified in the base options
size: '75%',
showInLegend: false,
slicedOffset: 10,
states: {
hover: {
brightness: 0.1,
shadow: false
}
}
});
>>>>>>> |
<<<<<<<
import generatePatternStyles from '../../utils/generatePatternStyles';
import useRichText from '../../components/richText/useRichText';
=======
import { useTransformHandler } from '../../components/transform';
>>>>>>>
import generatePatternStyles from '../../utils/generatePatternStyles';
import useRichText from '../../components/richText/useRichText';
import { useTransformHandler } from '../../components/transform';
<<<<<<<
&::after {
content: '';
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 1px solid ${({ theme }) => theme.colors.mg.v1}70;
pointer-events: none;
}
=======
${elementWithBackgroundColor}
>>>>>>>
&::after {
content: '';
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 1px solid ${({ theme }) => theme.colors.mg.v1}70;
pointer-events: none;
}
<<<<<<<
const {
state: { editorState },
actions: { getContentFromState },
} = useRichText();
const editorContent = editorState && getContentFromState(editorState);
=======
useTransformHandler(id, (transform) => {
const target = textBoxRef.current;
const wrapper = wrapperRef.current;
const updatedFontSize = transform?.updates?.fontSize;
target.style.fontSize = updatedFontSize
? `${dataToEditorY(updatedFontSize)}px`
: '';
if (transform === null) {
wrapper.style.width = '';
wrapper.style.height = '';
} else {
const { resize } = transform;
if (resize && resize[0] !== 0 && resize[1] !== 0) {
wrapper.style.width = `${resize[0]}px`;
wrapper.style.height = `${resize[1]}px`;
}
}
});
>>>>>>>
useTransformHandler(id, (transform) => {
const target = textBoxRef.current;
const wrapper = wrapperRef.current;
const updatedFontSize = transform?.updates?.fontSize;
target.style.fontSize = updatedFontSize
? `${dataToEditorY(updatedFontSize)}px`
: '';
if (transform === null) {
wrapper.style.width = '';
wrapper.style.height = '';
} else {
const { resize } = transform;
if (resize && resize[0] !== 0 && resize[1] !== 0) {
wrapper.style.width = `${resize[0]}px`;
wrapper.style.height = `${resize[1]}px`;
}
}
});
const {
state: { editorState },
actions: { getContentFromState },
} = useRichText();
const editorContent = editorState && getContentFromState(editorState);
<<<<<<<
<Wrapper ref={wrapperRef} onClick={onClick} data-testid="textEditor">
{editorContent && backgroundTextMode === BACKGROUND_TEXT_MODE.HIGHLIGHT && (
<TextBox {...textProps}>
<Highlight
dangerouslySetInnerHTML={{ __html: editorContent }}
{...textProps}
/>
</TextBox>
)}
=======
<Wrapper
ref={wrapperRef}
onClick={onClick}
data-testid="textEditor"
{...textProps}
>
>>>>>>>
<Wrapper ref={wrapperRef} onClick={onClick} data-testid="textEditor">
{editorContent && backgroundTextMode === BACKGROUND_TEXT_MODE.HIGHLIGHT && (
<TextBox {...textProps}>
<Highlight
dangerouslySetInnerHTML={{ __html: editorContent }}
{...textProps}
/>
</TextBox>
)} |
<<<<<<<
}, obj3This);
});
QUnit.test('datePropsToTimestamps', function (assert) {
var date = new Date(2017, 0, 0),
actual = {
date1: date,
date2: +date,
object: {
date3: date,
date4: +date
},
array: [
date,
+date
]
},
expectedTimestamp = date.getTime(),
expected = {
date1: expectedTimestamp,
date2: expectedTimestamp,
object: {
date3: expectedTimestamp,
date4: expectedTimestamp
},
array: [
expectedTimestamp,
expectedTimestamp
]
};
Highcharts.datePropsToTimestamps(actual);
assert.equal(
actual.date1,
expectedTimestamp,
'Date object converted to timeStamp'
);
assert.equal(
actual.date2,
expectedTimestamp,
'Timestamp left as is'
);
assert.equal(
actual.object.date3,
expectedTimestamp,
'Date object inside object, inside another object is converted'
);
assert.equal(
actual.array[0],
expectedTimestamp,
'Date object inside array, inside another object is converted'
);
assert.deepEqual(
actual,
expected,
'All date objects inside object are recursively converted'
);
});
=======
objectEach(obj3, function (val, key, ctx) {
assert.equal(
this,
obj3This,
'3rd param injects context to use with `this`'
);
assert.equal(
ctx,
obj3,
'3rd param in callback is the object being iterated over'
);
}, obj3This);
});
}());
>>>>>>>
objectEach(obj3, function (val, key, ctx) {
assert.equal(
this,
obj3This,
'3rd param injects context to use with `this`'
);
assert.equal(
ctx,
obj3,
'3rd param in callback is the object being iterated over'
);
}, obj3This);
});
QUnit.test('datePropsToTimestamps', function (assert) {
var date = new Date(2017, 0, 0),
actual = {
date1: date,
date2: +date,
object: {
date3: date,
date4: +date
},
array: [
date,
+date
]
},
expectedTimestamp = date.getTime(),
expected = {
date1: expectedTimestamp,
date2: expectedTimestamp,
object: {
date3: expectedTimestamp,
date4: expectedTimestamp
},
array: [
expectedTimestamp,
expectedTimestamp
]
};
Highcharts.datePropsToTimestamps(actual);
assert.equal(
actual.date1,
expectedTimestamp,
'Date object converted to timeStamp'
);
assert.equal(
actual.date2,
expectedTimestamp,
'Timestamp left as is'
);
assert.equal(
actual.object.date3,
expectedTimestamp,
'Date object inside object, inside another object is converted'
);
assert.equal(
actual.array[0],
expectedTimestamp,
'Date object inside array, inside another object is converted'
);
assert.deepEqual(
actual,
expected,
'All date objects inside object are recursively converted'
);
});
}()); |
<<<<<<<
import { Color, Label, Row } from '../../form';
import { useCommonColorValue } from '../utils';
import getColorPickerActions from '../utils/getColorPickerActions';
=======
import { BACKGROUND_TEXT_MODE } from '../../../constants';
import { ReactComponent as NoneIcon } from '../../../icons/fill_none_icon.svg';
import { ReactComponent as FilledIcon } from '../../../icons/fill_filled_icon.svg';
import { ReactComponent as HighlightedIcon } from '../../../icons/fill_highlighted_icon.svg';
import { Color, Label, Row, ToggleButton } from '../../form';
import { useKeyDownEffect } from '../../keyboard';
import { useCommonColorValue, getCommonValue } from '../utils';
const FillRow = styled(Row)`
align-items: flex-start;
justify-content: flex-start;
`;
const FillLabel = styled(Label)`
flex-basis: 45px;
line-height: 32px;
`;
const FillToggleButton = styled(ToggleButton)`
flex: 1 1 32px;
svg {
width: 16px;
height: 16px;
}
`;
const Space = styled.div`
flex: ${({ flex }) => flex};
`;
const BUTTONS = [
{
mode: BACKGROUND_TEXT_MODE.NONE,
label: __('None', 'web-stories'),
Icon: NoneIcon,
},
{
mode: BACKGROUND_TEXT_MODE.FILL,
label: __('Fill', 'web-stories'),
Icon: FilledIcon,
},
{
mode: BACKGROUND_TEXT_MODE.HIGHLIGHT,
label: __('Highlight', 'web-stories'),
Icon: HighlightedIcon,
},
];
>>>>>>>
import { BACKGROUND_TEXT_MODE } from '../../../constants';
import { ReactComponent as NoneIcon } from '../../../icons/fill_none_icon.svg';
import { ReactComponent as FilledIcon } from '../../../icons/fill_filled_icon.svg';
import { ReactComponent as HighlightedIcon } from '../../../icons/fill_highlighted_icon.svg';
import { Color, Label, Row, ToggleButton } from '../../form';
import { useKeyDownEffect } from '../../keyboard';
import { useCommonColorValue, getCommonValue } from '../utils';
import getColorPickerActions from '../utils/getColorPickerActions';
const FillRow = styled(Row)`
align-items: flex-start;
justify-content: flex-start;
`;
const FillLabel = styled(Label)`
flex-basis: 45px;
line-height: 32px;
`;
const FillToggleButton = styled(ToggleButton)`
flex: 1 1 32px;
svg {
width: 16px;
height: 16px;
}
`;
const Space = styled.div`
flex: ${({ flex }) => flex};
`;
const BUTTONS = [
{
mode: BACKGROUND_TEXT_MODE.NONE,
label: __('None', 'web-stories'),
Icon: NoneIcon,
},
{
mode: BACKGROUND_TEXT_MODE.FILL,
label: __('Fill', 'web-stories'),
Icon: FilledIcon,
},
{
mode: BACKGROUND_TEXT_MODE.HIGHLIGHT,
label: __('Highlight', 'web-stories'),
Icon: HighlightedIcon,
},
];
<<<<<<<
onChange={(value) => pushUpdate({ color: value }, true)}
colorPickerActions={getColorPickerActions}
/>
</Row>
<Row>
<Label>{__('Textbox', 'web-stories')}</Label>
<Color
data-testid="text.backgroundColor"
hasGradient
value={backgroundColor}
onChange={(value) => pushUpdate({ backgroundColor: value }, true)}
label={__('Background color', 'web-stories')}
=======
onChange={(value) =>
pushUpdate(
{
color: value,
},
true
)
}
>>>>>>>
onChange={(value) =>
pushUpdate(
{
color: value,
},
true
)
}
colorPickerActions={getColorPickerActions} |
<<<<<<<
=======
* Extend getSegments to force null points if the higher value is null. #1703.
*/
getSegments: function () {
var series = this;
each(series.points, function (point) {
if (!series.options.connectNulls && (point.low === null || point.high === null)) {
point.y = null;
} else if (point.low === null && point.high !== null) {
point.y = point.high;
}
});
Series.prototype.getSegments.call(this);
},
/**
>>>>>>>
<<<<<<<
getGraphPath: function () {
var points = this.points,
highPoints = [],
highAreaPoints = [],
i = points.length,
getGraphPath = Series.prototype.getGraphPath,
=======
getSegmentPath: function (segment) {
var lowSegment,
highSegment = [],
i = segment.length,
baseGetSegmentPath = Series.prototype.getSegmentPath,
>>>>>>>
getGraphPath: function () {
var points = this.points,
highPoints = [],
highAreaPoints = [],
i = points.length,
getGraphPath = Series.prototype.getGraphPath,
<<<<<<<
higherPath,
higherAreaPath;
// Create the top line and the top part of the area fill. The area fill compensates for
// null points by drawing down to the lower graph, moving across the null gap and
// starting again at the lower graph.
i = points.length;
=======
higherPath;
// Remove nulls from low segment
lowSegment = HighchartsAdapter.grep(segment, function (point) {
return point.plotLow !== null;
});
// Make a segment with plotX and plotY for the top values
>>>>>>>
higherPath,
higherAreaPath;
// Create the top line and the top part of the area fill. The area fill compensates for
// null points by drawing down to the lower graph, moving across the null gap and
// starting again at the lower graph.
i = points.length;
<<<<<<<
higherAreaPath[0] = 'L'; // this probably doesn't work for spline
this.areaPath = this.areaPath.concat(lowerPath, higherAreaPath);
=======
if (!this.chart.polar) {
higherPath[0] = 'L'; // this probably doesn't work for spline
}
this.areaPath = this.areaPath.concat(lowerPath, higherPath);
>>>>>>>
if (!this.chart.polar) {
higherAreaPath[0] = 'L'; // this probably doesn't work for spline
}
this.areaPath = this.areaPath.concat(lowerPath, higherAreaPath); |
<<<<<<<
=======
PRODUCT = 'Highcharts',
VERSION = '4.1.4-modified',
>>>>>>>
<<<<<<<
minDate.setMilliseconds(interval >= timeUnits.second ? 0 :
count * Math.floor(minDate.getMilliseconds() / count)); // #3652, #3654
=======
minDate[setMilliseconds](interval >= timeUnits.second ? 0 : // #3935
count * mathFloor(minDate.getMilliseconds() / count)); // #3652, #3654
>>>>>>>
minDate[setMilliseconds](interval >= timeUnits.second ? 0 : // #3935
count * Math.floor(minDate.getMilliseconds() / count)); // #3652, #3654
<<<<<<<
minDate.setSeconds(interval >= timeUnits.minute ? 0 :
count * Math.floor(minDate.getSeconds() / count));
=======
minDate[setSeconds](interval >= timeUnits.minute ? 0 : // #3935
count * mathFloor(minDate.getSeconds() / count));
>>>>>>>
minDate[setSeconds](interval >= timeUnits.minute ? 0 : // #3935
count * Math.floor(minDate.getSeconds() / count));
<<<<<<<
verticalCenter = legend.baseline - Math.round(renderer.fontMetrics(legendOptions.itemStyle.fontSize, this.legendItem).b * 0.3),
=======
verticalCenter = legend.baseline - mathRound(legend.fontMetrics.b * 0.3),
>>>>>>>
verticalCenter = legend.baseline - Math.round(legend.fontMetrics.b * 0.3), |
<<<<<<<
import H from '../Core/Globals.js';
=======
import H from '../parts/Globals.js';
import Math3D from '../parts-3d/Math.js';
var perspective = Math3D.perspective, shapeArea3D = Math3D.shapeArea3D;
>>>>>>>
import H from '../Core/Globals.js';
import Math3D from '../parts-3d/Math.js';
var perspective = Math3D.perspective, shapeArea3D = Math3D.shapeArea3D; |
<<<<<<<
QUnit.test("Null points should not have data labels(#4641)", function (assert) {
var chart = $('#container').highcharts({
chart: {
type: 'pie'
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
format: '{point.y:.1f} %'
}
}
},
series: [{
name: "Brands",
data: [{
name: "Microsoft Internet Explorer",
//y: 56.33,
y: null
}, {
name: "Chrome",
y: 24.03
}, {
name: "Firefox",
y: 10.38
}, {
name: "Safari",
y: 4.77
}, {
name: "Opera",
y: 0.91
}, {
name: "Proprietary or Undetectable",
y: 0.2
}]
}]
}).highcharts();
assert.strictEqual(
typeof chart.series[0].points[0].dataLabel,
'undefined',
"No Data label for null point"
);
assert.strictEqual(
typeof chart.series[0].points[1].dataLabel,
'object',
'Second point has data label'
);
});
=======
QUnit.test('Pie data labels were not hidden on scaling down (#4905)', function (assert) {
var chart = Highcharts.chart('container', {
chart: {
type: 'pie',
width: 520,
height: 300,
animation: false
},
plotOptions: {
pie: {
animation: false,
size: '70%' // Removing size option will fix labels reflow issue
}
},
series: [{
data: [{
y: 20541,
name: "David Cameron"
}, {
y: 6462,
name: "Barack Obama"
}, {
y: 3954,
name: "Jeremy Corbyn"
}, {
y: 3826,
name: "Donald Trump"
}, {
y: 3395,
name: "David"
}, {
y: 3046,
name: "David Price"
}, {
y: 2853,
name: "Obama"
}, {
y: 2693,
name: "David Warner"
}, {
y: 2626,
name: "Hillary Clinton"
}, {
y: 2565,
name: "Francois Hollande"
}, {
y: 2421,
name: "David Beckham"
}, {
y: 2410,
name: "Vladimir Putin"
}, {
y: 2007,
name: "Angela Merkel"
}, {
y: 1879,
name: "Malcolm Turnbull"
}, {
y: 1745,
name: "Xi Jinping"
}, {
y: 1717,
name: "Francis"
}, {
y: 1686,
name: "David Wright"
}, {
y: 1502,
name: "Andy Murray"
}, {
y: 1483,
name: "Bernie Sanders"
}, {
y: 1476,
name: "Usman Khawaja"
}, {
y: 1428,
name: "Bashar al-Assad"
}, {
y: 1413,
name: "Michael Cheika"
}, {
y: 1393,
name: "Louis van Gaal"
}, {
y: 1375,
name: "Jeb Bush"
}, {
y: 1338,
name: "Tashfeen Malik"
}, {
y: 1068,
name: "David Moyes"
}, {
y: 1000,
name: "Michael"
}, {
y: 999,
name: "Louis"
}, {
y: 998,
name: "Jeb"
}, {
y: 996,
name: "Tashfeen"
}, {
y: 995,
name: "Alex"
}],
name: "Test"
}]
});
function getVisibleLabelCount() {
return chart.series[0].points.filter(function (point) {
return point.dataLabel.attr('visibility') !== 'hidden';
}).length;
}
var initialLabelCount = getVisibleLabelCount();
assert.strictEqual(
typeof initialLabelCount,
'number',
'Initial label count'
);
chart.setSize(900, 600);
assert.ok(
getVisibleLabelCount() > initialLabelCount,
'More labels visible'
);
chart.setSize(520, 300);
assert.strictEqual(
getVisibleLabelCount(),
initialLabelCount,
'Back to start'
);
});
>>>>>>>
QUnit.test('Pie data labels were not hidden on scaling down (#4905)', function (assert) {
var chart = Highcharts.chart('container', {
chart: {
type: 'pie',
width: 520,
height: 300,
animation: false
},
plotOptions: {
pie: {
animation: false,
size: '70%' // Removing size option will fix labels reflow issue
}
},
series: [{
data: [{
y: 20541,
name: "David Cameron"
}, {
y: 6462,
name: "Barack Obama"
}, {
y: 3954,
name: "Jeremy Corbyn"
}, {
y: 3826,
name: "Donald Trump"
}, {
y: 3395,
name: "David"
}, {
y: 3046,
name: "David Price"
}, {
y: 2853,
name: "Obama"
}, {
y: 2693,
name: "David Warner"
}, {
y: 2626,
name: "Hillary Clinton"
}, {
y: 2565,
name: "Francois Hollande"
}, {
y: 2421,
name: "David Beckham"
}, {
y: 2410,
name: "Vladimir Putin"
}, {
y: 2007,
name: "Angela Merkel"
}, {
y: 1879,
name: "Malcolm Turnbull"
}, {
y: 1745,
name: "Xi Jinping"
}, {
y: 1717,
name: "Francis"
}, {
y: 1686,
name: "David Wright"
}, {
y: 1502,
name: "Andy Murray"
}, {
y: 1483,
name: "Bernie Sanders"
}, {
y: 1476,
name: "Usman Khawaja"
}, {
y: 1428,
name: "Bashar al-Assad"
}, {
y: 1413,
name: "Michael Cheika"
}, {
y: 1393,
name: "Louis van Gaal"
}, {
y: 1375,
name: "Jeb Bush"
}, {
y: 1338,
name: "Tashfeen Malik"
}, {
y: 1068,
name: "David Moyes"
}, {
y: 1000,
name: "Michael"
}, {
y: 999,
name: "Louis"
}, {
y: 998,
name: "Jeb"
}, {
y: 996,
name: "Tashfeen"
}, {
y: 995,
name: "Alex"
}],
name: "Test"
}]
});
function getVisibleLabelCount() {
return chart.series[0].points.filter(function (point) {
return point.dataLabel.attr('visibility') !== 'hidden';
}).length;
}
var initialLabelCount = getVisibleLabelCount();
assert.strictEqual(
typeof initialLabelCount,
'number',
'Initial label count'
);
chart.setSize(900, 600);
assert.ok(
getVisibleLabelCount() > initialLabelCount,
'More labels visible'
);
chart.setSize(520, 300);
assert.strictEqual(
getVisibleLabelCount(),
initialLabelCount,
'Back to start'
);
});
QUnit.test("Null points should not have data labels(#4641)", function (assert) {
var chart = $('#container').highcharts({
chart: {
type: 'pie'
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
format: '{point.y:.1f} %'
}
}
},
series: [{
name: "Brands",
data: [{
name: "Microsoft Internet Explorer",
//y: 56.33,
y: null
}, {
name: "Chrome",
y: 24.03
}, {
name: "Firefox",
y: 10.38
}, {
name: "Safari",
y: 4.77
}, {
name: "Opera",
y: 0.91
}, {
name: "Proprietary or Undetectable",
y: 0.2
}]
}]
}).highcharts();
assert.strictEqual(
typeof chart.series[0].points[0].dataLabel,
'undefined',
"No Data label for null point"
);
assert.strictEqual(
typeof chart.series[0].points[1].dataLabel,
'object',
'Second point has data label'
);
}); |
<<<<<<<
=======
globalAnimation = renderer.globalAnimation;
>>>>>>>
/*= if (build.classic) { =*/
globalAnimation = renderer.globalAnimation;
<<<<<<<
HighchartsAdapter.fireEvent(this, eventType, eventArgs, defaultFunction);
}
};
return H;
}(Highcharts));
(function (H) {
var addEvent = H.addEvent,
arrayMax = H.arrayMax,
arrayMin = H.arrayMin,
Color = H.Color, // @todo add as a requirement
Date = H.Date,
defaultOptions = H.defaultOptions,
defaultPlotOptions = H.defaultPlotOptions,
defined = H.defined,
each = H.each,
erase = H.erase,
error = H.error,
extend = H.extend,
isArray = H.isArray,
isNumber = H.isNumber,
isObject = H.isObject,
isString = H.isString,
LegendSymbolMixin = H.LegendSymbolMixin, // @todo add as a requirement
merge = H.merge,
pick = H.pick,
Point = H.Point, // @todo add as a requirement
removeEvent = H.removeEvent,
splat = H.splat,
stableSort = H.stableSort,
SVGElement = H.SVGElement,
useCanVG = H.useCanVG;
/**
=======
fireEvent(this, eventType, eventArgs, defaultFunction);
},
visible: true
};/**
>>>>>>>
fireEvent(this, eventType, eventArgs, defaultFunction);
},
visible: true
};
return H;
}(Highcharts));(function (H) {
var addEvent = H.addEvent,
arrayMax = H.arrayMax,
arrayMin = H.arrayMin,
Color = H.Color, // @todo add as a requirement
Date = H.Date,
defaultOptions = H.defaultOptions,
defaultPlotOptions = H.defaultPlotOptions,
defined = H.defined,
each = H.each,
erase = H.erase,
error = H.error,
extend = H.extend,
isArray = H.isArray,
isNumber = H.isNumber,
isObject = H.isObject,
isString = H.isString,
LegendSymbolMixin = H.LegendSymbolMixin, // @todo add as a requirement
merge = H.merge,
pick = H.pick,
Point = H.Point, // @todo add as a requirement
removeEvent = H.removeEvent,
splat = H.splat,
stableSort = H.stableSort,
SVGElement = H.SVGElement,
useCanVG = H.useCanVG;
/**
<<<<<<<
seriesBarW = series.barW = Math.max(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset,
xCrisp = -(borderWidth % 2 ? 0.5 : 0),
yCrisp = borderWidth % 2 ? 0.5 : 1;
=======
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset;
>>>>>>>
seriesBarW = series.barW = Math.max(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset;
<<<<<<<
var yBottom = pick(point.yBottom, translatedThreshold),
safeDistance = 999 + Math.abs(yBottom),
plotY = Math.min(Math.max(-safeDistance, point.plotY), yAxis.len + safeDistance), // Don't draw too far outside plot area (#1303, #2241, #4264)
=======
var yBottom = mathMin(pick(point.yBottom, translatedThreshold), 9e4), // #3575
safeDistance = 999 + mathAbs(yBottom),
plotY = mathMin(mathMax(-safeDistance, point.plotY), yAxis.len + safeDistance), // Don't draw too far outside plot area (#1303, #2241, #4264)
>>>>>>>
var yBottom = pick(point.yBottom, translatedThreshold),
safeDistance = 999 + Math.abs(yBottom),
plotY = Math.min(Math.max(-safeDistance, point.plotY), yAxis.len + safeDistance), // Don't draw too far outside plot area (#1303, #2241, #4264)
<<<<<<<
barY = Math.min(plotY, yBottom),
right,
bottom,
fromTop,
=======
barY = mathMin(plotY, yBottom),
>>>>>>>
barY = Math.min(plotY, yBottom),
<<<<<<<
barY =
Math.round(Math.abs(barY - translatedThreshold) > minPointLength ? // stacked
=======
barY = mathAbs(barY - translatedThreshold) > minPointLength ? // stacked
>>>>>>>
barY = Math.abs(barY - translatedThreshold) > minPointLength ? // stacked
<<<<<<<
// Round off to obtain crisp edges and avoid overlapping with neighbours (#2694)
right = Math.round(barX + barW) + xCrisp;
barX = Math.round(barX) + xCrisp;
barW = right - barX;
fromTop = Math.abs(barY) <= 0.5; // #4504
bottom = Math.min(Math.round(barY + barH) + yCrisp, 9e4); // #3575
barY = Math.round(barY) + yCrisp;
barH = bottom - barY;
// Top edges are exceptions
if (fromTop) {
barY -= 1;
barH += 1;
}
=======
>>>>>>> |
<<<<<<<
import '../Series/Bar/BarSeries.js';
import '../Series/ScatterSeries.js';
=======
import '../Series/BarSeries.js';
import '../Series/Scatter/ScatterSeries.js';
>>>>>>>
import '../Series/Bar/BarSeries.js';
import '../Series/Scatter/ScatterSeries.js'; |
<<<<<<<
function DisplayElement({ element, previewMode, page }) {
const { getBox } = useUnits((state) => ({
getBox: state.actions.getBox,
}));
=======
function AnimationWrapper({ children, id, isAnimatable }) {
return isAnimatable ? (
<StoryAnimation.WAAPIWrapper target={id}>
{children}
</StoryAnimation.WAAPIWrapper>
) : (
children
);
}
AnimationWrapper.propTypes = {
isAnimatable: PropTypes.bool.isRequired,
children: PropTypes.arrayOf(PropTypes.node),
id: PropTypes.string,
};
function DisplayElement({ element, previewMode, page, isAnimatable = false }) {
const {
actions: { getBox },
} = useUnits();
>>>>>>>
function AnimationWrapper({ children, id, isAnimatable }) {
return isAnimatable ? (
<StoryAnimation.WAAPIWrapper target={id}>
{children}
</StoryAnimation.WAAPIWrapper>
) : (
children
);
}
AnimationWrapper.propTypes = {
isAnimatable: PropTypes.bool.isRequired,
children: PropTypes.arrayOf(PropTypes.node),
id: PropTypes.string,
};
function DisplayElement({ element, previewMode, page, isAnimatable = false }) {
const { getBox } = useUnits((state) => ({
getBox: state.actions.getBox,
})); |
<<<<<<<
=======
PRODUCT = 'Highstock',
VERSION = '2.1.4-modified',
>>>>>>>
<<<<<<<
minDate.setMilliseconds(interval >= timeUnits.second ? 0 :
count * Math.floor(minDate.getMilliseconds() / count)); // #3652, #3654
=======
minDate[setMilliseconds](interval >= timeUnits.second ? 0 : // #3935
count * mathFloor(minDate.getMilliseconds() / count)); // #3652, #3654
>>>>>>>
minDate[setMilliseconds](interval >= timeUnits.second ? 0 : // #3935
count * Math.floor(minDate.getMilliseconds() / count)); // #3652, #3654
<<<<<<<
minDate.setSeconds(interval >= timeUnits.minute ? 0 :
count * Math.floor(minDate.getSeconds() / count));
=======
minDate[setSeconds](interval >= timeUnits.minute ? 0 : // #3935
count * mathFloor(minDate.getSeconds() / count));
>>>>>>>
minDate[setSeconds](interval >= timeUnits.minute ? 0 : // #3935
count * Math.floor(minDate.getSeconds() / count));
<<<<<<<
verticalCenter = legend.baseline - Math.round(renderer.fontMetrics(legendOptions.itemStyle.fontSize, this.legendItem).b * 0.3),
=======
verticalCenter = legend.baseline - mathRound(legend.fontMetrics.b * 0.3),
>>>>>>>
verticalCenter = legend.baseline - Math.round(legend.fontMetrics.b * 0.3), |
<<<<<<<
import * as actionsToWrap2 from './local/actions';
=======
import * as localActionsToWrap from './actions';
>>>>>>>
import * as localActionsToWrap from './local/actions';
<<<<<<<
function useMediaReducer(reducer = rootReducer, actionsToWrap = actionsToWrap2) {
=======
function useMediaReducer(
reducer = rootReducer,
actionsToWrap = localActionsToWrap
) {
>>>>>>>
function useMediaReducer(
reducer = rootReducer,
actionsToWrap = localActionsToWrap
) {
<<<<<<<
const wrappedActions = useMemo(() => wrapWithDispatch(actionsToWrap, dispatch), []);
=======
const wrappedActions = useMemo(
() => wrapWithDispatch(actionsToWrap, dispatch),
[actionsToWrap]
);
>>>>>>>
const wrappedActions = useMemo(
() => wrapWithDispatch(actionsToWrap, dispatch),
[actionsToWrap]
); |
<<<<<<<
box = wrapper.box,
parentNode = element.parentNode,
=======
>>>>>>>
box = wrapper.box,
<<<<<<<
version: '2.1.7'
});
=======
version: '2.1.9'
};
>>>>>>>
version: '2.1.9'
}); |
<<<<<<<
H.Series = H.seriesType('line', null, { // base series options
/**
* The SVG value used for the `stroke-linecap` and `stroke-linejoin`
* of a line graph. Round means that lines are rounded in the ends and
* bends.
*
* @type {string}
* @validvalue ["round", "butt", "square"]
* @default round
* @since 3.0.7
* @apioption plotOptions.line.linecap
*/
=======
, { // base series options
/*= if (build.classic) { =*/
>>>>>>>
, { // base series options
/**
* The SVG value used for the `stroke-linecap` and `stroke-linejoin`
* of a line graph. Round means that lines are rounded in the ends and
* bends.
*
* @type {string}
* @validvalue ["round", "butt", "square"]
* @default round
* @since 3.0.7
* @apioption plotOptions.line.linecap
*/
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
},
=======
/*= } =*/
},
/*= if (build.classic) { =*/
>>>>>>>
},
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
if (this.chart.styledMode) {
this.getCyclic('color');
} else if (this.options.colorByPoint) {
=======
this.getCyclic('color');
},
/*= } else { =*/
getColor: function () {
if (this.options.colorByPoint) {
>>>>>>>
if (this.chart.styledMode) {
this.getCyclic('color');
} else if (this.options.colorByPoint) {
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
each(this.zones, function (zone, i) {
var propset = [
=======
this.zones.forEach(function (zone, i) {
props.push([
>>>>>>>
this.zones.forEach(function (zone, i) {
var propset = [ |
<<<<<<<
styleRegex,
hrefRegex,
=======
styleRegex = /<.*style="([^"]+)".*>/,
hrefRegex = /<.*href="(http[^"]+)".*>/,
>>>>>>>
styleRegex,
hrefRegex,
<<<<<<<
attribs = isObject(x) ? x : {
=======
attr = isObject(x) ? x : x === UNDEFINED ? {} : {
>>>>>>>
attribs = isObject(x) ? x : x === UNDEFINED ? {} : {
<<<<<<<
attribs.rx = attribs.ry = r;
}
wrapper.rSetter = function (value) {
attr(this.element, {
rx: value,
ry: value
});
};
=======
attr.r = r;
}
>>>>>>>
attribs.rx = attribs.ry = r;
}
wrapper.rSetter = function (value) {
attr(this.element, {
rx: value,
ry: value
});
};
<<<<<<<
var defaultChartStyle = defaultOptions.chart.style,
wrapper = this.createElement('span'),
=======
var wrapper = this.createElement('span'),
attrSetters = wrapper.attrSetters,
>>>>>>>
var wrapper = this.createElement('span'), |
<<<<<<<
if (numericSymbolDetector >= multi && (value * 10) % multi === 0 && numericSymbols[i] !== null) {
ret = H.numberFormat(value / multi, -1) + numericSymbols[i];
=======
if (numericSymbolDetector >= multi && (value * 10) % multi === 0 && numericSymbols[i] !== null && value !== 0) { // #5480
ret = Highcharts.numberFormat(value / multi, -1) + numericSymbols[i];
>>>>>>>
if (numericSymbolDetector >= multi && (value * 10) % multi === 0 && numericSymbols[i] !== null && value !== 0) { // #5480
ret = H.numberFormat(value / multi, -1) + numericSymbols[i];
<<<<<<<
each(this.series, function (series) {
var seriesClosest = series.closestPointRange;
if (!series.noSharedTooltip && defined(seriesClosest)) {
ret = defined(ret) ?
Math.min(ret, seriesClosest) :
seriesClosest;
}
});
=======
if (this.categories) {
ret = 1;
} else {
each(this.series, function (series) {
var seriesClosest = series.closestPointRange;
if (!series.noSharedTooltip && defined(seriesClosest)) {
ret = defined(ret) ?
mathMin(ret, seriesClosest) :
seriesClosest;
}
});
}
>>>>>>>
if (this.categories) {
ret = 1;
} else {
each(this.series, function (series) {
var seriesClosest = series.closestPointRange;
if (!series.noSharedTooltip && defined(seriesClosest)) {
ret = defined(ret) ?
Math.min(ret, seriesClosest) :
seriesClosest;
}
});
}
<<<<<<<
fontSize = this.chart.renderer.fontMetrics(axisTitleOptions.style && axisTitleOptions.style.fontSize, this.axisTitle).f,
=======
fontSize = this.chart.renderer.fontMetrics(axisTitleOptions.style.fontSize).f,
>>>>>>>
fontSize = this.chart.renderer.fontMetrics(axisTitleOptions.style && axisTitleOptions.style.fontSize, this.axisTitle).f,
<<<<<<<
// Destroy local variables
each(['stackTotalGroup', 'axisLine', 'axisTitle', 'axisGroup', 'cross', 'gridGroup', 'labelGroup', 'cross'], function (prop) {
=======
// Destroy properties
each(['stackTotalGroup', 'axisLine', 'axisTitle', 'axisGroup', 'gridGroup', 'labelGroup', 'cross'], function (prop) {
>>>>>>>
// Destroy local variables
each(['stackTotalGroup', 'axisLine', 'axisTitle', 'axisGroup', 'gridGroup', 'labelGroup', 'cross'], function (prop) {
<<<<<<<
// Delete all properties and fall back to the prototype
for (var n in axis) {
if (axis.hasOwnProperty(n)) {
delete axis[n];
}
}
=======
this._addedPlotLB = this.chart._labelPanes = this.ordinalSlope = undefined; // #1611, #2887, #4314, #5316
>>>>>>>
this._addedPlotLB = this.chart._labelPanes = this.ordinalSlope = undefined; // #1611, #2887, #4314, #5316
<<<<<<<
graphic.show().attr({
d: path
});
if (categorized) {
graphic.attr({
'stroke-width': this.transA
});
}
=======
this.cross.e = e;
>>>>>>>
graphic.show().attr({
d: path
});
if (categorized) {
graphic.attr({
'stroke-width': this.transA
});
}
this.cross.e = e; |
<<<<<<<
H.Date = Date = globalOptions.Date || window.Date; // Allow using a different Date class
Date.hcTimezoneOffset = useUTC && globalOptions.timezoneOffset;
Date.hcGetTimezoneOffset = useUTC && globalOptions.getTimezoneOffset;
Date.hcMakeTime = function (year, month, date, hours, minutes, seconds) {
=======
Date = globalOptions.Date || win.Date;
timezoneOffset = useUTC && globalOptions.timezoneOffset;
getTimezoneOffset = useUTC && globalOptions.getTimezoneOffset;
makeTime = function (year, month, date, hours, minutes, seconds) {
>>>>>>>
H.Date = Date = globalOptions.Date || win.Date; // Allow using a different Date class
Date.hcTimezoneOffset = useUTC && globalOptions.timezoneOffset;
Date.hcGetTimezoneOffset = useUTC && globalOptions.getTimezoneOffset;
Date.hcMakeTime = function (year, month, date, hours, minutes, seconds) { |
<<<<<<<
import BackgroundColorPanel from './backgroundColor';
import BackgroundStylePanel from './backgroundStyle';
=======
>>>>>>>
import BackgroundStylePanel from './backgroundStyle';
<<<<<<<
import MediaStylePanel from './mediaStyle';
import RotationPanel from './rotationAngle';
import SizePanel from './size';
import PositionPanel from './position';
=======
import SizePositionPanel from './sizePosition';
>>>>>>>
import MediaStylePanel from './mediaStyle';
import SizePositionPanel from './sizePosition';
<<<<<<<
const MEDIA_STYLE = 'mediaStyle';
=======
const TEXT_STYLE = 'textStyle';
>>>>>>>
const TEXT_STYLE = 'textStyle';
const MEDIA_STYLE = 'mediaStyle';
<<<<<<<
BACKGROUND_STYLE,
POSITION,
SIZE,
=======
SIZE_POSITION,
>>>>>>>
BACKGROUND_STYLE,
SIZE_POSITION,
<<<<<<<
case ROTATION_ANGLE:
return { type, Panel: RotationPanel };
case SIZE:
return { type, Panel: SizePanel };
case MEDIA_STYLE:
return { type, Panel: MediaStylePanel };
=======
case SIZE_POSITION:
return { type, Panel: SizePositionPanel };
>>>>>>>
case SIZE_POSITION:
return { type, Panel: SizePositionPanel };
case MEDIA_STYLE:
return { type, Panel: MediaStylePanel }; |
<<<<<<<
H.Map = function (options, callback) {
var hiddenAxis = {
=======
Highcharts.Map = Highcharts.mapChart = function (a, b, c) {
var hasRenderToArg = typeof a === 'string' || a.nodeName,
options = arguments[hasRenderToArg ? 1 : 0],
hiddenAxis = {
>>>>>>>
Highcharts.Map = Highcharts.mapChart = function (a, b, c) {
var hasRenderToArg = typeof a === 'string' || a.nodeName,
options = arguments[hasRenderToArg ? 1 : 0],
hiddenAxis = {
<<<<<<<
return new Chart(options, callback);
};
return H;
}(Highcharts));
=======
return hasRenderToArg ?
new Chart(a, options, c) :
new Chart(options, b);
};
>>>>>>>
return hasRenderToArg ?
new Chart(a, options, c) :
new Chart(options, b);
};
return H;
}(Highcharts)); |
<<<<<<<
var SVG_NS = 'http://www.w3.org/2000/svg',
svg = !!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect,
isIE = /(msie|trident)/i.test(userAgent) && !window.opera,
useCanVG = !svg && !isIE && !!document.createElement('canvas').getContext,
userAgent = navigator.userAgent,
isFirefox = /Firefox/.test(userAgent),
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4; // issue #38
window.Highcharts = window.Highcharts ? window.Highcharts.error(16, true) : {
deg2rad: Math.PI * 2 / 360,
hasBidiBug: hasBidiBug,
isIE: isIE,
isWebKit: /AppleWebKit/.test(userAgent),
isFirefox: isFirefox,
isTouchDevice: /(Mobile|Android|Windows Phone)/.test(userAgent),
SVG_NS: SVG_NS,
idCounter: 0,
chartCount: 0,
seriesTypes: {},
svg: svg,
timeUnits: {
millisecond: 1,
second: 1000,
minute: 60000,
hour: 3600000,
day: 24 * 3600000,
week: 7 * 24 * 3600000,
month: 28 * 24 * 3600000,
year: 364 * 24 * 3600000
},
useCanVG: useCanVG,
charts: [],
noop: function () {}
};
=======
// encapsulated variables
var UNDEFINED,
doc = document,
win = window,
math = Math,
mathRound = math.round,
mathFloor = math.floor,
mathCeil = math.ceil,
mathMax = math.max,
mathMin = math.min,
mathAbs = math.abs,
mathCos = math.cos,
mathSin = math.sin,
mathPI = math.PI,
deg2rad = mathPI * 2 / 360,
// some variables
userAgent = navigator.userAgent,
isOpera = win.opera,
isIE = /(msie|trident)/i.test(userAgent) && !isOpera,
docMode8 = doc.documentMode === 8,
isWebKit = /AppleWebKit/.test(userAgent),
isFirefox = /Firefox/.test(userAgent),
isTouchDevice = /(Mobile|Android|Windows Phone)/.test(userAgent),
SVG_NS = 'http://www.w3.org/2000/svg',
hasSVG = !!doc.createElementNS && !!doc.createElementNS(SVG_NS, 'svg').createSVGRect,
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4, // issue #38
useCanVG = !hasSVG && !isIE && !!doc.createElement('canvas').getContext,
Renderer,
hasTouch,
symbolSizes = {},
idCounter = 0,
garbageBin,
defaultOptions,
dateFormat, // function
globalAnimation,
pathAnim,
timeUnits,
noop = function () { return UNDEFINED; },
charts = [],
chartCount = 0,
PRODUCT = 'Highcharts',
VERSION = '4.1.5-modified',
// some constants for frequently used strings
DIV = 'div',
ABSOLUTE = 'absolute',
RELATIVE = 'relative',
HIDDEN = 'hidden',
PREFIX = 'highcharts-',
VISIBLE = 'visible',
PX = 'px',
NONE = 'none',
M = 'M',
L = 'L',
numRegex = /^[0-9]+$/,
NORMAL_STATE = '',
HOVER_STATE = 'hover',
SELECT_STATE = 'select',
marginNames = ['plotTop', 'marginRight', 'marginBottom', 'plotLeft'],
// Object for extending Axis
AxisPlotLineOrBandExtension,
// constants for attributes
STROKE_WIDTH = 'stroke-width',
// time methods, changed based on whether or not UTC is used
Date, // Allow using a different Date class
makeTime,
timezoneOffset,
getTimezoneOffset,
getMinutes,
getHours,
getDay,
getDate,
getMonth,
getFullYear,
setMilliseconds,
setSeconds,
setMinutes,
setHours,
setDate,
setMonth,
setFullYear,
// lookup over the types and the associated classes
seriesTypes = {},
Highcharts;
// The Highcharts namespace
Highcharts = win.Highcharts = win.Highcharts ? error(16, true) : {};
Highcharts.seriesTypes = seriesTypes;
>>>>>>>
var SVG_NS = 'http://www.w3.org/2000/svg',
svg = !!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect,
isIE = /(msie|trident)/i.test(userAgent) && !window.opera,
useCanVG = !svg && !isIE && !!document.createElement('canvas').getContext,
userAgent = navigator.userAgent,
isFirefox = /Firefox/.test(userAgent),
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4; // issue #38
window.Highcharts = window.Highcharts ? window.Highcharts.error(16, true) : {
deg2rad: Math.PI * 2 / 360,
hasBidiBug: hasBidiBug,
isIE: isIE,
isWebKit: /AppleWebKit/.test(userAgent),
isFirefox: isFirefox,
isTouchDevice: /(Mobile|Android|Windows Phone)/.test(userAgent),
SVG_NS: SVG_NS,
idCounter: 0,
chartCount: 0,
seriesTypes: {},
svg: svg,
timeUnits: {
millisecond: 1,
second: 1000,
minute: 60000,
hour: 3600000,
day: 24 * 3600000,
week: 7 * 24 * 3600000,
month: 28 * 24 * 3600000,
year: 364 * 24 * 3600000
},
useCanVG: useCanVG,
charts: [],
noop: function () {}
};
<<<<<<<
if (hasContrast) { // Apply the altered style
Highcharts.css(elem, {
textShadow: textShadow
});
}
=======
css(elem, styles); // Apply altered textShadow or textRendering workaround
>>>>>>>
Highcharts.css(elem, styles); // Apply altered textShadow or textRendering workaround
<<<<<<<
wordStr = span.substring(0, wordStr.length + (tooLong ? -1 : 1) * Math.ceil(cursor));
words = [wordStr + '\u2026'];
=======
wordStr = span.substring(0, wordStr.length + (tooLong ? -1 : 1) * mathCeil(cursor));
words = [wordStr + (width > 3 ? '\u2026' : '')];
>>>>>>>
wordStr = span.substring(0, wordStr.length + (tooLong ? -1 : 1) * Math.ceil(cursor));
words = [wordStr + (width > 3 ? '\u2026' : '')];
<<<<<<<
if (y !== undefined) {
// As a workaround for #3649, use translation instead of y attribute. #3649
// is a rendering bug in WebKit for Retina (Mac, iOS, PhantomJS) that
// results in duplicated text when an y attribute is used in combination
// with a CSS text-style.
text.attr(text.element.nodeName === 'SPAN' ? 'y' : 'translateY', y);
=======
if (y !== UNDEFINED) {
text.attr('y', y);
>>>>>>>
if (y !== undefined) {
text.attr('y', y);
<<<<<<<
if (!isDatetimeAxis && !isLog) { // linear
if (!tickIntervalOption) {
axis.tickInterval = H.normalizeTickInterval(
axis.tickInterval,
null,
H.getMagnitude(axis.tickInterval),
// If the tick interval is between 0.5 and 5 and the axis max is in the order of
// thousands, chances are we are dealing with years. Don't allow decimals. #3363.
pick(options.allowDecimals, !(axis.tickInterval > 0.5 && axis.tickInterval < 5 && axis.max > 1000 && axis.max < 9999)),
!!this.tickAmount
);
}
=======
if (!isDatetimeAxis && !isLog && !tickIntervalOption) {
axis.tickInterval = normalizeTickInterval(
axis.tickInterval,
null,
getMagnitude(axis.tickInterval),
// If the tick interval is between 0.5 and 5 and the axis max is in the order of
// thousands, chances are we are dealing with years. Don't allow decimals. #3363.
pick(options.allowDecimals, !(axis.tickInterval > 0.5 && axis.tickInterval < 5 && axis.max > 1000 && axis.max < 9999)),
!!this.tickAmount
);
>>>>>>>
if (!isDatetimeAxis && !isLog && !tickIntervalOption) {
axis.tickInterval = H.normalizeTickInterval(
axis.tickInterval,
null,
H.getMagnitude(axis.tickInterval),
// If the tick interval is between 0.5 and 5 and the axis max is in the order of
// thousands, chances are we are dealing with years. Don't allow decimals. #3363.
pick(options.allowDecimals, !(axis.tickInterval > 0.5 && axis.tickInterval < 5 && axis.max > 1000 && axis.max < 9999)),
!!this.tickAmount
);
<<<<<<<
fontSize = H.pInt(axisTitleOptions.style.fontSize || 12),
=======
xOption = axisTitleOptions.x || 0, // docs
yOption = axisTitleOptions.y || 0,
fontSize = pInt(axisTitleOptions.style.fontSize || 12),
>>>>>>>
xOption = axisTitleOptions.x || 0, // docs
yOption = axisTitleOptions.y || 0,
fontSize = H.pInt(axisTitleOptions.style.fontSize || 12),
<<<<<<<
Math.round(pos.x),
Math.round(pos.y),
=======
mathRound(pos.x),
mathRound(pos.y || 0), // can be undefined (#3977)
>>>>>>>
Math.round(pos.x),
Math.round(pos.y || 0), // can be undefined (#3977)
<<<<<<<
timeUnits = H.timeUnits,
lastN;
=======
lastN = 'millisecond'; // for sub-millisecond data, #4223
>>>>>>>
timeUnits = H.timeUnits,
lastN = 'millisecond'; // for sub-millisecond data, #4223
<<<<<<<
if (this.hasZoom || this.followTouchMove) {
H.css(chart.container, {
'-ms-touch-action': 'none',
'touch-action': 'none'
=======
if (this.hasZoom) { // #4014
css(chart.container, {
'-ms-touch-action': NONE,
'touch-action': NONE
>>>>>>>
if (this.hasZoom) { // #4014
H.css(chart.container, {
'-ms-touch-action': 'none',
'touch-action': 'none'
<<<<<<<
options.labelFormat ? H.format(options.labelFormat, item) : options.labelFormatter.call(item),
=======
'',
>>>>>>>
'',
<<<<<<<
if (yBottom === 0) {
yBottom = Highcharts.pick(threshold, yAxis.min);
=======
if (yBottom === stackThreshold) {
yBottom = pick(threshold, yAxis.min);
>>>>>>>
if (yBottom === stackThreshold) {
yBottom = Highcharts.pick(threshold, yAxis.min);
<<<<<<<
pointAttr[''] = series.convertAttribs(Highcharts.extend(attr, normalOptions), seriesPointAttr['']);
=======
// Color is explicitly set to null or undefined (#1288, #4068)
if (normalOptions.hasOwnProperty('color') && !normalOptions.color) {
delete normalOptions.color;
}
pointAttr[NORMAL_STATE] = series.convertAttribs(extend(attr, normalOptions), seriesPointAttr[NORMAL_STATE]);
>>>>>>>
// Color is explicitly set to null or undefined (#1288, #4068)
if (normalOptions.hasOwnProperty('color') && !normalOptions.color) {
delete normalOptions.color;
}
pointAttr[''] = series.convertAttribs(Highcharts.extend(attr, normalOptions), seriesPointAttr['']);
<<<<<<<
// destroy all SVGElements associated to the series
Highcharts.each(['area', 'graph', 'dataLabelsGroup', 'group', 'markerGroup', 'tracker',
'graphNeg', 'areaNeg', 'posClip', 'negClip'], function (prop) {
if (series[prop]) {
=======
// Destroy all SVGElements associated to the series
for (prop in series) {
if (series[prop] instanceof SVGElement && !series[prop].survive) { // Survive provides a hook for not destroying
>>>>>>>
// Destroy all SVGElements associated to the series
for (prop in series) {
if (series[prop] instanceof Highcharts.SVGElement && !series[prop].survive) { // Survive provides a hook for not destroying
<<<<<<<
Highcharts.each(zones, function (threshold, i) {
props.push(['colorGraph' + i, threshold.color || series.color, threshold.dashStyle || options.dashStyle]);
=======
each(zones, function (threshold, i) {
props.push(['zoneGraph' + i, threshold.color || series.color, threshold.dashStyle || options.dashStyle]);
>>>>>>>
Highcharts.each(zones, function (threshold, i) {
props.push(['zoneGraph' + i, threshold.color || series.color, threshold.dashStyle || options.dashStyle]);
<<<<<<<
Highcharts.each(zones, function (threshold, i) {
translatedFrom = pick(translatedTo, (reversed ? (horiz ? chart.plotWidth : 0) : (horiz ? 0 : axis.toPixels(axis.min))));
translatedTo = Math.round(axis.toPixels(pick(threshold.value, axis.max), true));
=======
extremes = axis.getExtremes();
each(zones, function (threshold, i) {
>>>>>>>
extremes = axis.getExtremes();
Highcharts.each(zones, function (threshold, i) {
<<<<<<<
defined = Highcharts.defined,
kdComparer = this.kdComparer,
=======
>>>>>>>
defined = Highcharts.defined,
<<<<<<<
if (Highcharts.isObject(options) && !Highcharts.isArray(options)) {
=======
if (point.y === null && graphic) { // #4146
point.graphic = graphic.destroy();
}
if (isObject(options) && !isArray(options)) {
>>>>>>>
if (point.y === null && graphic) { // #4146
point.graphic = graphic.destroy();
}
if (Highcharts.isObject(options) && !Highcharts.isArray(options)) {
<<<<<<<
Highcharts.each([graph, area, series.graphNeg, series.areaNeg], function (shape) {
if (shape) {
shape.shift = currentShift + 1;
=======
i = series.zones.length;
while (i--) {
shiftShapes.push('zoneGraph' + i, 'zoneArea' + i);
}
each(shiftShapes, function (shape) {
if (series[shape]) {
series[shape].shift = currentShift + 1;
>>>>>>>
i = series.zones.length;
while (i--) {
shiftShapes.push('zoneGraph' + i, 'zoneArea' + i);
}
Highcharts.each(shiftShapes, function (shape) {
if (series[shape]) {
series[shape].shift = currentShift + 1;
<<<<<<<
Highcharts.each(zones, function (threshold, i) {
props.push(['colorArea' + i, threshold.color || series.color, threshold.fillColor || options.fillColor]);
=======
each(zones, function (threshold, i) {
props.push(['zoneArea' + i, threshold.color || series.color, threshold.fillColor || options.fillColor]);
>>>>>>>
Highcharts.each(zones, function (threshold, i) {
props.push(['zoneArea' + i, threshold.color || series.color, threshold.fillColor || options.fillColor]);
<<<<<<<
barH = Math.max(plotY, yBottom) - barY;
=======
up,
barH = mathMax(plotY, yBottom) - barY;
>>>>>>>
up,
barH = Math.max(plotY, yBottom) - barY;
<<<<<<<
graphic.animate(Highcharts.extend(shapeArgs, groupTranslation));
=======
graphic.animate(extend(shapeArgs, groupTranslation));
>>>>>>>
graphic.animate(Highcharts.extend(shapeArgs, groupTranslation));
<<<<<<<
center[2] = newSize;
this.translate(center);
Highcharts.each(this.points, function (point) {
=======
this.center = this.getCenter(newSize);
this.translate(this.center);
each(this.points, function (point) {
>>>>>>>
this.center = this.getCenter(newSize);
this.translate(this.center);
Highcharts.each(this.points, function (point) {
<<<<<<<
addEvent = Highcharts.addEvent;
=======
pick = H.pick,
addEvent = HighchartsAdapter.addEvent;
>>>>>>>
pick = H.pick,
addEvent = HighchartsAdapter.addEvent; |
<<<<<<<
export const SET_MEDIA_TYPE = 'SET_MEDIA_TYPE';
export const REMOVE_PROCESSING = 'REMOVE_PROCESSING';
export const ADD_PROCESSING = 'ADD_PROCESSING';
export const UPDATE_MEDIA_ELEMENT = 'UPDATE_MEDIA_ELEMENT';
=======
export const SET_MEDIA_TYPE = 'SET_MEDIA_TYPE';
export const SET_NEXT_PAGE = 'SET_NEXT_PAGE';
>>>>>>>
export const SET_MEDIA_TYPE = 'SET_MEDIA_TYPE';
export const SET_NEXT_PAGE = 'SET_NEXT_PAGE';
export const REMOVE_PROCESSING = 'REMOVE_PROCESSING';
export const ADD_PROCESSING = 'ADD_PROCESSING';
export const UPDATE_MEDIA_ELEMENT = 'UPDATE_MEDIA_ELEMENT'; |
<<<<<<<
seriesType('mapline', 'map', {
=======
, {
/*= if (build.classic) { =*/
>>>>>>>
, {
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>> |
<<<<<<<
init: function(series, options, x) {
=======
init: function (series, options) {
>>>>>>>
init: function (series, options, x) {
<<<<<<<
applyOptions: function(options, x) {
=======
applyOptions: function (options) {
>>>>>>>
applyOptions: function (options, x) {
<<<<<<<
if (optionsType === 'number' || options === null) {
point.y = options;
}
// two-dimentional array
else if (typeof options[0] === 'number') {
point.x = options[0];
point.y = options[1];
}
// object input
else if (optionsType === 'object' && typeof options.length !== 'number') {
=======
if (isNumber(options) || options === null) {
point.y = options;
} else if (isObject(options) && !isNumber(options.length)) { // object input
>>>>>>>
if (optionsType === 'number' || options === null) {
point.y = options;
} else if (typeof options[0] === 'number') { // two-dimentional array
point.x = options[0];
point.y = options[1];
} else if (optionsType === 'object' && typeof options.length !== 'number') { // object input
<<<<<<<
}
// categorized data with name in first position
else if (typeof options[0] === 'string') {
=======
} else if (isString(options[0])) { // categorized data with name in first position
>>>>>>>
} else if (typeof options[0] === 'string') { // categorized data with name in first position
<<<<<<<
}
/*
=======
} else if (isNumber(options[0])) { // two-dimentional array
point.x = options[0];
point.y = options[1];
}
/*
>>>>>>>
}
/*
<<<<<<<
if (point.graphic || point.dataLabel) { // removeEvent and destroyElements are performance expensive
removeEvent(point);
point.destroyElements();
}
=======
removeEvent(point);
each(['graphic', 'tracker', 'group', 'dataLabel', 'connector'], function (prop) {
if (point[prop]) {
point[prop].destroy();
}
});
>>>>>>>
if (point.graphic || point.dataLabel) { // removeEvent and destroyElements are performance expensive
removeEvent(point);
point.destroyElements();
}
<<<<<<<
onMouseOver: function() {
=======
onMouseOver: function () {
>>>>>>>
onMouseOver: function () {
<<<<<<<
onMouseOut: function() {
=======
onMouseOut: function () {
>>>>>>>
onMouseOut: function () {
<<<<<<<
return ['<span style="color:'+ series.color +'">', (point.name || series.name), '</span>: ',
(!useHeader ? ('<b>x = '+ (point.name || point.x) + ',</b> ') : ''),
'<b>', (!useHeader ? 'y = ' : '' ), point.y, '</b>'].join('');
=======
return ['<span style="color:' + series.color + '">', (point.name || series.name), '</span>: ',
(!useHeader ? ('<b>x = ' + (point.name || point.x) + ',</b> ') : ''),
'<b>', (!useHeader ? 'y = ' : ''), point.y, '</b>'].join('');
>>>>>>>
return ['<span style="color:' + series.color + '">', (point.name || series.name), '</span>: ',
(!useHeader ? ('<b>x = ' + (point.name || point.x) + ',</b> ') : ''),
'<b>', (!useHeader ? 'y = ' : ''), point.y, '</b>'].join('');
<<<<<<<
// fire the event with a default handler of removing the point
point.firePointEvent('remove', null, function() {
=======
// fire the event with a default handler of removing the point
point.firePointEvent('remove', null, function () {
>>>>>>>
// fire the event with a default handler of removing the point
point.firePointEvent('remove', null, function () {
<<<<<<<
radius = markerOptions.radius;
series.stateMarkerGraphic = stateMarkerGraphic = chart.renderer.symbol(
series.symbol,
- radius,
- radius,
2 * radius,
2 * radius
=======
series.stateMarkerGraphic = stateMarkerGraphic = chart.renderer.circle(
0,
0,
pointAttr[state].r
>>>>>>>
radius = markerOptions.radius;
series.stateMarkerGraphic = stateMarkerGraphic = chart.renderer.symbol(
series.symbol,
-radius,
-radius,
2 * radius,
2 * radius
<<<<<<<
=======
/**
* Sort the data and remove duplicates
*/
cleanData: function () {
var series = this,
chart = series.chart,
data = series.data,
closestPoints,
smallestInterval,
chartSmallestInterval = chart.smallestInterval,
interval,
i;
// sort the data points
data.sort(function (a, b) {
return (a.x - b.x);
});
// remove points with equal x values
// record the closest distance for calculation of column widths
/*for (i = data.length - 1; i >= 0; i--) {
if (data[i - 1]) {
if (data[i - 1].x == data[i].x) {
data[i - 1].destroy();
data.splice(i - 1, 1); // remove the duplicate
}
}
}*/
// connect nulls
if (series.options.connectNulls) {
for (i = data.length - 1; i >= 0; i--) {
if (data[i].y === null && data[i - 1] && data[i + 1]) {
data.splice(i, 1);
}
}
}
// find the closes pair of points
for (i = data.length - 1; i >= 0; i--) {
if (data[i - 1]) {
interval = data[i].x - data[i - 1].x;
if (interval > 0 && (smallestInterval === UNDEFINED || interval < smallestInterval)) {
smallestInterval = interval;
closestPoints = i;
}
}
}
if (chartSmallestInterval === UNDEFINED || smallestInterval < chartSmallestInterval) {
chart.smallestInterval = smallestInterval;
}
series.closestPoints = closestPoints;
},
>>>>>>>
<<<<<<<
each(points, function(point, i) {
=======
each(data, function (point, i) {
>>>>>>>
each(points, function (point, i) {
<<<<<<<
// parallel arrays
var xData = [],
yData = [],
dataLength = data.length,
turboThreshold = options.turboThreshold || 1000,
pt;
// In turbo mode, only one- or twodimensional arrays of numbers are allowed. The
// first value is tested, and we assume that all the rest are defined the same
// way. Although the 'for' loops are similar, they are repeated inside each
// if-else conditional for max performance.
if (dataLength > turboThreshold) {
if (isNumber(data[0])) { // assume all points are numbers
var x = pick(options.pointStart, 0),
pointInterval = pick(options.pointInterval, 1);
for (i = 0; i < dataLength; i++) {
xData[i] = x;
yData[i] = data[i];
x += pointInterval;
}
series.xIncrement = x;
} else if (data[0].constructor === Array) { // assume all points are arrays
if (series.valueCount === 4) { // [x, o, h, l, c]
for (i = 0; i < dataLength; i++) {
pt = data[i];
xData[i] = pt[0];
yData[i] = pt.slice(1, 5);
}
} else { // [x, y]
for (i = 0; i < dataLength; i++) {
pt = data[i];
xData[i] = pt[0];
yData[i] = pt[1];
}
}
}
} else {
for (i = 0; i < dataLength; i++) {
pt = { series: series };
series.pointClass.prototype.applyOptions.apply(pt, [data[i]]);
xData[i] = pt.x;
yData[i] = pt.y;
}
}
series.data = null;
series.options.data = data;
series.xData = xData;
series.yData = yData;
=======
data = map(splat(data || []), function (pointOptions) {
return (new series.pointClass()).init(series, pointOptions);
});
>>>>>>>
// parallel arrays
var xData = [],
yData = [],
dataLength = data.length,
turboThreshold = options.turboThreshold || 1000,
pt;
// In turbo mode, only one- or twodimensional arrays of numbers are allowed. The
// first value is tested, and we assume that all the rest are defined the same
// way. Although the 'for' loops are similar, they are repeated inside each
// if-else conditional for max performance.
if (dataLength > turboThreshold) {
if (isNumber(data[0])) { // assume all points are numbers
var x = pick(options.pointStart, 0),
pointInterval = pick(options.pointInterval, 1);
for (i = 0; i < dataLength; i++) {
xData[i] = x;
yData[i] = data[i];
x += pointInterval;
}
series.xIncrement = x;
} else if (data[0].constructor === Array) { // assume all points are arrays
if (series.valueCount === 4) { // [x, o, h, l, c]
for (i = 0; i < dataLength; i++) {
pt = data[i];
xData[i] = pt[0];
yData[i] = pt.slice(1, 5);
}
} else { // [x, y]
for (i = 0; i < dataLength; i++) {
pt = data[i];
xData[i] = pt[0];
yData[i] = pt[1];
}
}
}
} else {
for (i = 0; i < dataLength; i++) {
pt = { series: series };
series.pointClass.prototype.applyOptions.apply(pt, [data[i]]);
xData[i] = pt.x;
yData[i] = pt.y;
}
}
series.data = null;
series.options.data = data;
series.xData = xData;
series.yData = yData;
<<<<<<<
remove: function(redraw, animation) {
=======
remove: function (redraw, animation) {
>>>>>>>
remove: function (redraw, animation) {
<<<<<<<
// fire the event with a default handler of removing the point
fireEvent(series, 'remove', null, function() {
=======
// fire the event with a default handler of removing the point
fireEvent(series, 'remove', null, function () {
>>>>>>>
// fire the event with a default handler of removing the point
fireEvent(series, 'remove', null, function () {
<<<<<<<
translate: function() {
if (!this.processedXData) { // hidden series
this.processData();
}
this.generatePoints();
var series = this,
chart = series.chart,
options = series.options,
stacking = options.stacking,
xAxis = series.xAxis,
categories = xAxis.categories,
=======
translate: function () {
var series = this,
chart = series.chart,
stacking = series.options.stacking,
categories = series.xAxis.categories,
>>>>>>>
translate: function () {
if (!this.processedXData) { // hidden series
this.processData();
}
this.generatePoints();
var series = this,
chart = series.chart,
options = series.options,
stacking = options.stacking,
xAxis = series.xAxis,
categories = xAxis.categories,
<<<<<<<
each(series.segments || series.points, function(segment){
points = points.concat(segment);
=======
each(series.segments, function (segment) {
data = data.concat(segment);
>>>>>>>
each(series.segments || series.points, function (segment) {
points = points.concat(segment);
<<<<<<<
//each(points, function(point, i) {
pointsLength = points.length;
for (i = 0; i < pointsLength; i++) {
point = points[i];
low = points[i - 1] ? points[i - 1]._high + 1 : 0;
high = point._high = points[i + 1] ? (
mathFloor((point.plotX + (points[i + 1] ?
points[i + 1].plotX : plotSize)) / 2)) :
plotSize;
=======
each(data, function (point, i) {
low = data[i - 1] ? data[i - 1]._high + 1 : 0;
high = point._high = data[i + 1] ?
(mathFloor((point.plotX + (data[i + 1] ? data[i + 1].plotX : plotSize)) / 2)) :
plotSize;
>>>>>>>
//each(points, function (point, i) {
pointsLength = points.length;
for (i = 0; i < pointsLength; i++) {
point = points[i];
low = points[i - 1] ? points[i - 1]._high + 1 : 0;
high = point._high = points[i + 1] ?
(mathFloor((point.plotX + (points[i + 1] ? points[i + 1].plotX : plotSize)) / 2)) :
plotSize;
<<<<<<<
getAttribs: function() {
var series = this,
=======
getAttribs: function () {
var series = this,
>>>>>>>
getAttribs: function () {
var series = this,
<<<<<<<
each([HOVER_STATE, SELECT_STATE], function(state) {
seriesPointAttr[state] =
=======
each([HOVER_STATE, SELECT_STATE], function (state) {
seriesPointAttr[state] =
>>>>>>>
each([HOVER_STATE, SELECT_STATE], function (state) {
seriesPointAttr[state] =
<<<<<<<
i = data.length;
while(i--) {
point = data[i];
if (point && point.destroy) {
point.destroy();
}
}
series.points = null;
=======
each(series.data, function (point) {
point.destroy();
});
>>>>>>>
i = data.length;
while (i--) {
point = data[i];
if (point && point.destroy) {
point.destroy();
}
}
series.points = null;
<<<<<<<
each(points, function(point, i){
=======
each(data, function (point, i) {
>>>>>>>
each(points, function (point, i) {
<<<<<<<
drawGraph: function(state) {
var series = this,
options = series.options,
=======
drawGraph: function (state) {
var series = this,
options = series.options,
>>>>>>>
drawGraph: function (state) {
var series = this,
options = series.options,
<<<<<<<
each(chart.series, function(otherSeries) {
if (otherSeries.options.stacking && otherSeries.visible) {
=======
each(chart.series, function (otherSeries) {
if (otherSeries.options.stacking && otherSeries.visible) {
>>>>>>>
each(chart.series, function (otherSeries) {
if (otherSeries.options.stacking && otherSeries.visible) { |
<<<<<<<
// record the start position
//e.preventDefault && e.preventDefault();
=======
// issue #295, dragging not always working in Firefox
if (!hasTouch && e.preventDefault) {
e.preventDefault();
}
// record the start position
>>>>>>>
// issue #295, dragging not always working in Firefox
if (!hasTouch && e.preventDefault) {
e.preventDefault();
}
// record the start position
<<<<<<<
=======
// create the container
getContainer();
resetMargins();
setChartSize();
>>>>>>>
<<<<<<<
chart.xAxis = [];
chart.yAxis = [];
=======
>>>>>>>
chart.xAxis = [];
chart.yAxis = [];
<<<<<<<
chart.setTitle = setTitle;
chart.showLoading = showLoading;
chart.pointCount = 0;
chart.counters = new ChartCounters();
firstRender();
=======
chart.setTitle = setTitle;
chart.showLoading = showLoading;
chart.pointCount = 0;
chart.counters = new ChartCounters();
/*
if ($) $(function() {
$container = $('#container');
var origChartWidth,
origChartHeight;
if ($container) {
$('<button>+</button>')
.insertBefore($container)
.click(function() {
if (origChartWidth === UNDEFINED) {
origChartWidth = chartWidth;
origChartHeight = chartHeight;
}
chart.resize(chartWidth *= 1.1, chartHeight *= 1.1);
});
$('<button>-</button>')
.insertBefore($container)
.click(function() {
if (origChartWidth === UNDEFINED) {
origChartWidth = chartWidth;
origChartHeight = chartHeight;
}
chart.resize(chartWidth *= 0.9, chartHeight *= 0.9);
});
$('<button>1:1</button>')
.insertBefore($container)
.click(function() {
if (origChartWidth === UNDEFINED) {
origChartWidth = chartWidth;
origChartHeight = chartHeight;
}
chart.resize(origChartWidth, origChartHeight);
});
}
})
*/
firstRender();
>>>>>>>
chart.setTitle = setTitle;
chart.showLoading = showLoading;
chart.pointCount = 0;
chart.counters = new ChartCounters();
/*
if ($) $(function() {
$container = $('#container');
var origChartWidth,
origChartHeight;
if ($container) {
$('<button>+</button>')
.insertBefore($container)
.click(function() {
if (origChartWidth === UNDEFINED) {
origChartWidth = chartWidth;
origChartHeight = chartHeight;
}
chart.resize(chartWidth *= 1.1, chartHeight *= 1.1);
});
$('<button>-</button>')
.insertBefore($container)
.click(function() {
if (origChartWidth === UNDEFINED) {
origChartWidth = chartWidth;
origChartHeight = chartHeight;
}
chart.resize(chartWidth *= 0.9, chartHeight *= 0.9);
});
$('<button>1:1</button>')
.insertBefore($container)
.click(function() {
if (origChartWidth === UNDEFINED) {
origChartWidth = chartWidth;
origChartHeight = chartHeight;
}
chart.resize(origChartWidth, origChartHeight);
});
}
})
*/
firstRender(); |
<<<<<<<
/**
* Get presentational attributes
*/
=======
/*= if (build.classic) { =*/
// Get presentational attributes
>>>>>>>
// Get presentational attributes |
<<<<<<<
// set axes scales
each(axes, function (axis) {
axis.setScale();
});
=======
if (!chart.isResizing) {
// reset maxTicks
chart.maxTicks = null;
// set axes scales
each(axes, function (axis) {
axis.updateNames();
axis.setScale();
});
}
>>>>>>>
// set axes scales
each(axes, function (axis) {
axis.updateNames();
axis.setScale();
});
<<<<<<<
chartWidth = chart.chartWidth,
chartHeight = chart.chartHeight,
=======
>>>>>>>
<<<<<<<
width: chartWidth + 'px',
height: chartHeight + 'px'
=======
width: chart.chartWidth + PX,
height: chart.chartHeight + PX
>>>>>>>
width: chart.chartWidth + 'px',
height: chart.chartHeight + 'px' |
<<<<<<<
* @typedef Highcharts.SVGDefinitionObject
*
* @property {number|string|Array<Highcharts.SVGDefinitionObject>|undefined}
* [key:string]
*
* @property {Array<Highcharts.SVGDefinitionObject>|undefined} [children]
*
* @property {string|undefined} [tagName]
*
* @property {string|undefined} [textContent]
=======
* @interface Highcharts.SVGDefinitionObject
*//**
* @name Highcharts.SVGDefinitionObject#[key:string]
* @type {number|string|Array<Highcharts.SVGDefinitionObject>|undefined}
*//**
* @name Highcharts.SVGDefinitionObject#children
* @type {Array<Highcharts.SVGDefinitionObject>|undefined}
*//**
* @name Highcharts.SVGDefinitionObject#tagName
* @type {string|undefined}
*//**
* @name Highcharts.SVGDefinitionObject#textContent
* @type {string|undefined}
>>>>>>>
* @interface Highcharts.SVGDefinitionObject
*//**
* @name Highcharts.SVGDefinitionObject#[key:string]
* @type {number|string|Array<Highcharts.SVGDefinitionObject>|undefined}
*//**
* @name Highcharts.SVGDefinitionObject#children
* @type {Array<Highcharts.SVGDefinitionObject>|undefined}
*//**
* @name Highcharts.SVGDefinitionObject#tagName
* @type {string|undefined}
*//**
* @name Highcharts.SVGDefinitionObject#textContent
* @type {string|undefined}
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
*
* @param {boolean|undefined} [styledMode=false]
* Whether the renderer belongs to a chart that is in styled mode.
* If it does, it will avoid setting presentational attributes in
* some cases, but not when set explicitly through `.attr` and `.css`
* etc.
*
* @return {void}
=======
>>>>>>>
*
* @param {boolean} [styledMode=false]
* Whether the renderer belongs to a chart that is in styled mode.
* If it does, it will avoid setting presentational attributes in
* some cases, but not when set explicitly through `.attr` and `.css`
* etc.
*
* @return {void}
<<<<<<<
=======
/*= if (!build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
/**
=======
/*= if (!build.classic) { =*/
needsBox = true; // for styling
getCrispAdjust = function () {
return box.strokeWidth() % 2 / 2;
};
/*= } else { =*/
needsBox = hasBGImage;
getCrispAdjust = function () {
return (strokeWidth || 0) % 2 / 2;
};
/*= } =*/
/*
>>>>>>>
/**
<<<<<<<
var wrapperExtension = {
/**
=======
return extend(wrapper, {
/*
>>>>>>>
var wrapperExtension = {
/**
<<<<<<<
/**
=======
/*= if (build.classic) { =*/
/*
* Apply the shadow to the box.
*/
shadow: function (b) {
if (b) {
updateBoxSize();
if (box) {
box.shadow(b);
}
}
return wrapper;
},
/*= } =*/
/*
>>>>>>>
/** |
<<<<<<<
export { default as deactivateRTL } from './deactivateRTL';
export { default as activateRTL } from './activateRTL';
export { default as publishPost } from './publishPost';
=======
export { default as publishPost } from './publishPost';
export { default as addTextElement } from './addTextElement';
>>>>>>>
export { default as deactivateRTL } from './deactivateRTL';
export { default as activateRTL } from './activateRTL';
export { default as publishPost } from './publishPost';
export { default as addTextElement } from './addTextElement'; |
<<<<<<<
actions: { updateSelectedElements },
} = useStory();
const {
state: {
pageSize: { width: canvasWidth, height: canvasHeight },
nodesById,
},
} = useCanvas();
const {
actions: {
getBox,
editorToDataX,
editorToDataY,
dataToEditorY,
dataToEditorX,
},
} = useUnits();
=======
canvasWidth,
canvasHeight,
nodesById,
fullbleedContainer,
} = useCanvas(
({
state: {
pageSize: { width: canvasWidth, height: canvasHeight },
nodesById,
fullbleedContainer,
},
}) => ({ canvasWidth, canvasHeight, nodesById, fullbleedContainer })
);
const { getBox, editorToDataX, editorToDataY, dataToEditorY } = useUnits(
({ actions: { getBox, editorToDataX, editorToDataY, dataToEditorY } }) => ({
getBox,
editorToDataX,
editorToDataY,
dataToEditorY,
})
);
>>>>>>>
canvasWidth,
canvasHeight,
nodesById,
fullbleedContainer,
} = useCanvas(
({
state: {
pageSize: { width: canvasWidth, height: canvasHeight },
nodesById,
fullbleedContainer,
},
}) => ({ canvasWidth, canvasHeight, nodesById, fullbleedContainer })
);
const { getBox, editorToDataX, editorToDataY, dataToEditorY } = useUnits(
({ actions: { getBox, editorToDataX, editorToDataY, dataToEditorY, dataToEditorX } }) => ({
getBox,
editorToDataX,
editorToDataY,
dataToEditorY,
dataToEditorX,
})
);
<<<<<<<
const minWidth = dataToEditorX(resizeRules.minWidth);
const minHeight = dataToEditorY(resizeRules.minHeight);
const aspectRatio = selectedElement.width / selectedElement.height;
const visuallyHideHandles =
selectedElement.width <= resizeRules.minWidth ||
selectedElement.height <= resizeRules.minHeight;
const classNames = classnames('default-movable', {
'hide-handles': hideHandles,
'visually-hide-handles': visuallyHideHandles,
'type-text': selectedElement.type === 'text',
});
=======
// Removes element if it's outside of canvas.
const handleElementOutOfCanvas = (target) => {
if (isTargetOutOfContainer(target, fullbleedContainer)) {
setIsDragging(false);
setDraggingResource(null);
deleteSelectedElements();
return true;
}
return false;
};
>>>>>>>
// Removes element if it's outside of canvas.
const handleElementOutOfCanvas = (target) => {
if (isTargetOutOfContainer(target, fullbleedContainer)) {
setIsDragging(false);
setDraggingResource(null);
deleteSelectedElements();
return true;
}
return false;
};
const minWidth = dataToEditorX(resizeRules.minWidth);
const minHeight = dataToEditorY(resizeRules.minHeight);
const aspectRatio = selectedElement.width / selectedElement.height;
const visuallyHideHandles =
selectedElement.width <= resizeRules.minWidth ||
selectedElement.height <= resizeRules.minHeight;
const classNames = classnames('default-movable', {
'hide-handles': hideHandles,
'visually-hide-handles': visuallyHideHandles,
'type-text': selectedElement.type === 'text',
}); |
<<<<<<<
}
/*= } =*/
=======
},
widthAdjust: -44
>>>>>>>
},
/*= } =*/
widthAdjust: -44
<<<<<<<
}
/*= } =*/
=======
},
widthAdjust: -44
>>>>>>>
},
/*= } =*/
widthAdjust: -44 |
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
/**
* @type {Highcharts.CSSObject}
*/
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>> |
<<<<<<<
if (hasContrast) { // Apply the altered style
Highcharts.css(elem, {
textShadow: textShadow
});
}
=======
css(elem, styles); // Apply altered textShadow or textRendering workaround
>>>>>>>
Highcharts.css(elem, styles); // Apply altered textShadow or textRendering workaround
<<<<<<<
wordStr = span.substring(0, wordStr.length + (tooLong ? -1 : 1) * Math.ceil(cursor));
words = [wordStr + '\u2026'];
=======
wordStr = span.substring(0, wordStr.length + (tooLong ? -1 : 1) * mathCeil(cursor));
words = [wordStr + (width > 3 ? '\u2026' : '')];
>>>>>>>
wordStr = span.substring(0, wordStr.length + (tooLong ? -1 : 1) * Math.ceil(cursor));
words = [wordStr + (width > 3 ? '\u2026' : '')];
<<<<<<<
if (y !== undefined) {
// As a workaround for #3649, use translation instead of y attribute. #3649
// is a rendering bug in WebKit for Retina (Mac, iOS, PhantomJS) that
// results in duplicated text when an y attribute is used in combination
// with a CSS text-style.
text.attr(text.element.nodeName === 'SPAN' ? 'y' : 'translateY', y);
=======
if (y !== UNDEFINED) {
text.attr('y', y);
>>>>>>>
if (y !== undefined) {
text.attr('y', y); |
<<<<<<<
=======
// record old values to decide whether a rescale is necessary later on (#540)
oldUserMin = userMin;
oldUserMax = userMax;
>>>>>>>
// record old values to decide whether a rescale is necessary later on (#540)
oldUserMin = userMin;
oldUserMax = userMax; |
<<<<<<<
'dd',
=======
'defs',
>>>>>>>
'dd',
'defs', |
<<<<<<<
extend(Axis.prototype, AxisPlotLineOrBandExtension);
=======
/**
* Hide the crosshair.
*/
hideCrosshair: function () {
if (this.cross) {
this.cross.hide();
}
}
}; // end Axis
>>>>>>>
/**
* Hide the crosshair.
*/
hideCrosshair: function () {
if (this.cross) {
this.cross.hide();
}
}
}; // end Axis
extend(Axis.prototype, AxisPlotLineOrBandExtension); |
<<<<<<<
render: function () {
var resizer = this, axis = resizer.axis, chart = axis.chart, options = resizer.options, x = options.x || 0, y = options.y,
=======
AxisResizer.prototype.render = function () {
var resizer = this, axis = resizer.axis, chart = axis.chart, options = resizer.options, x = options.x, y = options.y,
>>>>>>>
AxisResizer.prototype.render = function () {
var resizer = this, axis = resizer.axis, chart = axis.chart, options = resizer.options, x = options.x || 0, y = options.y, |
<<<<<<<
pointAttribs: function (point, state) {
var seriesMarkerOptions = this.options.marker,
seriesStateOptions,
pointMarkerOptions = (point && point.options && point.options.marker) || {},
pointStateOptions,
strokeWidth = seriesMarkerOptions.lineWidth,
color = this.color,
pointColorOption = point && point.options.color,
pointColor = point && point.color,
zoneColor,
fill,
stroke,
zone;
if (point && this.zones.length) {
zone = point.getZone();
if (zone && zone.color) {
zoneColor = zone.color;
}
}
=======
getAttribs: function () {
var series = this,
seriesOptions = series.options,
normalOptions = defaultPlotOptions[series.type].marker ? seriesOptions.marker : seriesOptions,
stateOptions = normalOptions.states,
stateOptionsHover = stateOptions[HOVER_STATE],
pointStateOptionsHover,
seriesColor = series.color,
seriesNegativeColor = series.options.negativeColor,
normalDefaults = {
stroke: seriesColor,
fill: seriesColor
},
points = series.points || [], // #927
i,
j,
threshold,
point,
seriesPointAttr = [],
pointAttr,
pointAttrToOptions = series.pointAttrToOptions,
hasPointSpecificOptions = series.hasPointSpecificOptions,
defaultLineColor = normalOptions.lineColor,
defaultFillColor = normalOptions.fillColor,
turboThreshold = seriesOptions.turboThreshold,
zones = series.zones,
zoneAxis = series.zoneAxis || 'y',
zoneColor,
attr,
key;
// series type specific modifications
if (seriesOptions.marker) { // line, spline, area, areaspline, scatter
// if no hover radius is given, default to normal radius + 2
stateOptionsHover.radius = +stateOptionsHover.radius || +normalOptions.radius + +stateOptionsHover.radiusPlus;
stateOptionsHover.lineWidth = stateOptionsHover.lineWidth || normalOptions.lineWidth + stateOptionsHover.lineWidthPlus;
} else { // column, bar, pie
// if no hover color is given, brighten the normal color
stateOptionsHover.color = stateOptionsHover.color ||
Color(stateOptionsHover.color || seriesColor)
.brighten(stateOptionsHover.brightness).get();
// if no hover negativeColor is given, brighten the normal negativeColor
stateOptionsHover.negativeColor = stateOptionsHover.negativeColor ||
Color(stateOptionsHover.negativeColor || seriesNegativeColor)
.brighten(stateOptionsHover.brightness).get();
}
// general point attributes for the series normal state
seriesPointAttr[NORMAL_STATE] = series.convertAttribs(normalOptions, normalDefaults);
// HOVER_STATE and SELECT_STATE states inherit from normal state except the default radius
each([HOVER_STATE, SELECT_STATE], function (state) {
seriesPointAttr[state] =
series.convertAttribs(stateOptions[state], seriesPointAttr[NORMAL_STATE]);
});
// set it
series.pointAttr = seriesPointAttr;
// Generate the point-specific attribute collections if specific point
// options are given. If not, create a referance to the series wide point
// attributes
i = points.length;
if (!turboThreshold || i < turboThreshold || hasPointSpecificOptions) {
while (i--) {
point = points[i];
normalOptions = (point.options && point.options.marker) || point.options;
if (normalOptions && normalOptions.enabled === false) {
normalOptions.radius = 0;
}
zoneColor = null;
if (zones.length) {
j = 0;
threshold = zones[j];
while (point[zoneAxis] >= threshold.value) {
threshold = zones[++j];
}
point.color = point.fillColor = zoneColor = pick(threshold.color, series.color); // #3636, #4267, #4430 - inherit color from series, when color is undefined
}
hasPointSpecificOptions = seriesOptions.colorByPoint || point.color; // #868
// check if the point has specific visual options
if (point.options) {
for (key in pointAttrToOptions) {
if (defined(normalOptions[pointAttrToOptions[key]])) {
hasPointSpecificOptions = true;
}
}
}
// a specific marker config object is defined for the individual point:
// create it's own attribute collection
if (hasPointSpecificOptions) {
normalOptions = normalOptions || {};
pointAttr = [];
stateOptions = normalOptions.states || {}; // reassign for individual point
pointStateOptionsHover = stateOptions[HOVER_STATE] = stateOptions[HOVER_STATE] || {};
// Handle colors for column and pies
if (!seriesOptions.marker || (point.negative && !pointStateOptionsHover.fillColor && !stateOptionsHover.fillColor)) { // column, bar, point or negative threshold for series with markers (#3636)
// If no hover color is given, brighten the normal color. #1619, #2579
pointStateOptionsHover[series.pointAttrToOptions.fill] = pointStateOptionsHover.color || (!point.options.color && stateOptionsHover[(point.negative && seriesNegativeColor ? 'negativeColor' : 'color')]) ||
Color(point.color)
.brighten(pointStateOptionsHover.brightness || stateOptionsHover.brightness)
.get();
}
// normal point state inherits series wide normal state
attr = { color: point.color }; // #868
if (!defaultFillColor) { // Individual point color or negative color markers (#2219)
attr.fillColor = point.color;
}
if (!defaultLineColor) {
attr.lineColor = point.color; // Bubbles take point color, line markers use white
}
// Color is explicitly set to null or undefined (#1288, #4068)
if (normalOptions.hasOwnProperty('color') && !normalOptions.color) {
delete normalOptions.color;
}
// When zone is set, but series.states.hover.color is not set, apply zone color on hover, #4670:
if (zoneColor && !stateOptionsHover.fillColor) {
pointStateOptionsHover.fillColor = zoneColor;
}
pointAttr[NORMAL_STATE] = series.convertAttribs(extend(attr, normalOptions), seriesPointAttr[NORMAL_STATE]);
// inherit from point normal and series hover
pointAttr[HOVER_STATE] = series.convertAttribs(
stateOptions[HOVER_STATE],
seriesPointAttr[HOVER_STATE],
pointAttr[NORMAL_STATE]
);
// inherit from point normal and series hover
pointAttr[SELECT_STATE] = series.convertAttribs(
stateOptions[SELECT_STATE],
seriesPointAttr[SELECT_STATE],
pointAttr[NORMAL_STATE]
);
>>>>>>>
pointAttribs: function (point, state) {
var seriesMarkerOptions = this.options.marker,
seriesStateOptions,
pointMarkerOptions = (point && point.options && point.options.marker) || {},
pointStateOptions,
strokeWidth = seriesMarkerOptions.lineWidth,
color = this.color,
pointColorOption = point && point.options.color,
pointColor = point && point.color,
zoneColor,
fill,
stroke,
zone;
if (point && this.zones.length) {
zone = point.getZone();
if (zone && zone.color) {
zoneColor = zone.color;
}
}
<<<<<<<
graphPath = this.getGraphPath(),
props = [[
'graph',
'highcharts-graph',
/*= if (build.classic) { =*/
options.lineColor || this.color,
options.dashStyle
/*= } =*/
]];
// Add the zone properties if any
each(this.zones, function (zone, i) {
props.push([
'zone-graph-' + i,
'highcharts-graph highcharts-zone-graph-' + i + ' ' + (zone.className || ''),
/*= if (build.classic) { =*/
zone.color || series.color,
zone.dashStyle || options.dashStyle
/*= } =*/
]);
=======
props = [['graph', options.lineColor || this.color, options.dashStyle]],
lineWidth = options.lineWidth,
roundCap = options.linecap !== 'square',
graphPath = (this.gappedPath || this.getGraphPath).call(this),
zones = this.zones;
each(zones, function (threshold, i) {
props.push(['zoneGraph' + i, threshold.color || series.color, threshold.dashStyle || options.dashStyle]);
>>>>>>>
graphPath = this.getGraphPath(),
props = [[
'graph',
'highcharts-graph',
/*= if (build.classic) { =*/
options.lineColor || this.color,
options.dashStyle
/*= } =*/
]];
// Add the zone properties if any
each(this.zones, function (zone, i) {
props.push([
'zone-graph-' + i,
'highcharts-graph highcharts-zone-graph-' + i + ' ' + (zone.className || ''),
/*= if (build.classic) { =*/
zone.color || series.color,
zone.dashStyle || options.dashStyle
/*= } =*/
]);
<<<<<<<
} else if (graphPath.length) { // #1487
series[graphKey] = series.chart.renderer.path(graphPath)
.addClass('highcharts-graph ' + (prop[1] || ''))
.attr({ zIndex: 1 }) // #1069
.add(series.group);
/*= if (build.classic) { =*/
=======
} else if (lineWidth && graphPath.length) { // #1487
>>>>>>>
} else if (graphPath.length) { // #1487
series[graphKey] = series.chart.renderer.path(graphPath)
.addClass('highcharts-graph ' + (prop[1] || ''))
.attr({ zIndex: 1 }) // #1069
.add(series.group);
/*= if (build.classic) { =*/
<<<<<<<
'stroke': prop[2],
'stroke-width': options.lineWidth,
'fill': (series.fillGraph && series.color) || 'none' // Polygon series use filled graph
=======
stroke: prop[1],
'stroke-width': lineWidth,
fill: 'none',
zIndex: 1 // #1069
>>>>>>>
'stroke': prop[2],
'stroke-width': options.lineWidth,
'fill': (series.fillGraph && series.color) || 'none' // Polygon series use filled graph
<<<<<<<
series[graphKey]
=======
graph = series[graphKey] = series.chart.renderer.path(graphPath)
>>>>>>>
graph = series[graphKey] |
<<<<<<<
fill: 'none'
=======
/* presentational
fill: NONE
*/
>>>>>>>
/* presentational
fill: 'none'
*/
<<<<<<<
fontSize = fontSize || this.style.fontSize;
if (elem && window.getComputedStyle) {
elem = elem.element || elem; // SVGElement
style = window.getComputedStyle(elem, "");
fontSize = style && style.fontSize; // #4309, the style doesn't exist inside a hidden iframe in Firefox
}
=======
fontSize = (elem && SVGElement.prototype.getStyle.call(elem, 'fontSize')) || fontSize || this.style.fontSize;
>>>>>>>
fontSize = (elem && SVGElement.prototype.getStyle.call(elem, 'fontSize')) || fontSize || this.style.fontSize;
<<<<<<<
position: 'absolute',
=======
position: ABSOLUTE
/* presentational
>>>>>>>
position: 'absolute'
/* presentational
<<<<<<<
chart.container = container = createElement('div', {
className: 'highcharts-' + 'container' +
(optionsChart.className ? ' ' + optionsChart.className : ''),
=======
chart.container = container = createElement(DIV, {
className: PREFIX + 'container ' + (optionsChart.className || ''),
>>>>>>>
chart.container = container = createElement('div', {
className: 'highcharts-container ' + (optionsChart.className || ''),
<<<<<<<
}, extend({
position: 'relative',
overflow: 'hidden', // needed for context menu (avoid scrollbars) and
=======
}
/* presentational
, extend({
position: RELATIVE,
overflow: HIDDEN, // needed for context menu (avoid scrollbars) and
>>>>>>>
}
/* presentational
, extend({
position: 'relative',
overflow: 'hidden', // needed for context menu (avoid scrollbars) and
<<<<<<<
var legend = this;
// Set the events on the item group, or in case of useHTML, the item itself (#1249)
(useHTML ? legendItem : item.legendGroup).on('mouseover', function () {
item.setState('hover');
=======
var legend = this;
// Set the events on the item group, or in case of useHTML, the item itself (#1249)
(useHTML ? legendItem : item.legendGroup).on('mouseover', function () {
item.setState(HOVER_STATE);
/* presentational
>>>>>>>
var legend = this;
// Set the events on the item group, or in case of useHTML, the item itself (#1249)
(useHTML ? legendItem : item.legendGroup).on('mouseover', function () {
item.setState('hover');
/* presentational |
<<<<<<<
singlePoints = series.singlePoints,
singlePoint,
=======
cursor = options.cursor,
css = cursor && { cursor: cursor },
>>>>>>>
cursor = options.cursor,
css = cursor && { cursor: cursor },
<<<<<<<
trackerPath.push('M', singlePoint.plotX - snap, singlePoint.plotY,
'L', singlePoint.plotX + snap, singlePoint.plotY);
}
=======
trackerPath.push(M, singlePoint.plotX - snap, singlePoint.plotY,
L, singlePoint.plotX + snap, singlePoint.plotY);
}*/
>>>>>>>
trackerPath.push(M, singlePoint.plotX - snap, singlePoint.plotY,
L, singlePoint.plotX + snap, singlePoint.plotY);
}*/
<<<<<<<
if (axis.series.length &&
(goingLeft || newMin > Math.min(extremes.dataMin, extremes.min)) &&
(!goingLeft || newMax < Math.max(extremes.dataMax, extremes.max))) {
=======
if (axis.series.length &&
(goingLeft || newMin > mathMin(extremes.dataMin, extremes.min)) &&
(!goingLeft || newMax < mathMax(extremes.dataMax, extremes.max))) {
>>>>>>>
if (axis.series.length &&
(goingLeft || newMin > Math.min(extremes.dataMin, extremes.min)) &&
(!goingLeft || newMax < Math.max(extremes.dataMax, extremes.max))) {
<<<<<<<
}, haloOptions.attributes));
/*= } =*/
=======
},
haloOptions.attributes))[move ? 'animate' : 'attr']({
d: point.haloPath(haloOptions.size)
});
>>>>>>>
},
haloOptions.attributes))[move ? 'animate' : 'attr']({
d: point.haloPath(haloOptions.size)
});
/*= } =*/ |
<<<<<<<
if (isXAxis && minRange === UNDEFINED && !isLog) {
=======
if (isXAxis && minRange === UNDEFINED) {
>>>>>>>
if (isXAxis && minRange === UNDEFINED && !isLog) {
<<<<<<<
tickPositions = getTimeTicks(tickInterval, min, max, options.startOfWeek, options.units);
} else if (isLog) {
tickPositions = getLogTickPositions(tickInterval, min, max);
=======
tickPositions = (axis.getNonLinearTimeTicks || getTimeTicks)(
normalizeTimeTickInterval(tickInterval, options.units),
min,
max,
options.startOfWeek,
axis.ordinalPositions,
axis.closestPointRange,
true
);
>>>>>>>
tickPositions = (axis.getNonLinearTimeTicks || getTimeTicks)(
normalizeTimeTickInterval(tickInterval, options.units),
min,
max,
options.startOfWeek,
axis.ordinalPositions,
axis.closestPointRange,
true
);
} else if (isLog) {
tickPositions = getLogTickPositions(tickInterval, min, max); |
<<<<<<<
id: 'highcharts-navigator-series',
lineColor: '#4572A7',
=======
id: PREFIX + 'navigator-series',
lineColor: null, // Allow color setting while disallowing default candlestick setting (#4602)
>>>>>>>
id: 'highcharts-navigator-series',
lineColor: null, // Allow color setting while disallowing default candlestick setting (#4602) |
<<<<<<<
series.createGroup(doClip);
=======
if (!series.group) {
group = series.group = renderer.g('series');
group.attr({
visibility: series.visible ? VISIBLE : HIDDEN,
zIndex: options.zIndex
})
.translate(series.xAxis.left, series.yAxis.top)
.add(chart.seriesGroup);
}
>>>>>>>
series.createGroup(doClip);
if (!series.group) {
group = series.group = renderer.g('series');
group.attr({
visibility: series.visible ? VISIBLE : HIDDEN,
zIndex: options.zIndex
})
.translate(series.xAxis.left, series.yAxis.top)
.add(chart.seriesGroup);
} |
<<<<<<<
const MediaDisplayName = styled.div`
margin-top: 24px;
padding: 0 24px;
visibility: ${(props) => (props.shouldDisplay ? 'visible' : 'hidden')};
`;
=======
const PaneBottom = styled.div`
position: relative;
height: 100%;
flex: 0 1 auto;
min-height: 0;
`;
const ProviderMediaCategoriesWrapper = styled.div`
position: absolute;
visibility: hidden;
display: flex;
flex-direction: column;
max-height: 100%;
min-height: 100px;
&.provider-selected {
position: relative;
visibility: visible;
}
`;
>>>>>>>
const MediaDisplayName = styled.div`
margin-top: 24px;
padding: 0 24px;
visibility: ${(props) => (props.shouldDisplay ? 'visible' : 'hidden')};
`;
const PaneBottom = styled.div`
position: relative;
height: 100%;
flex: 0 1 auto;
min-height: 0;
`;
const ProviderMediaCategoriesWrapper = styled.div`
position: absolute;
visibility: hidden;
display: flex;
flex-direction: column;
max-height: 100%;
min-height: 100px;
&.provider-selected {
position: relative;
visibility: visible;
}
`;
<<<<<<<
const displayName = categories.selectedCategoryId
? categories.categories.find((e) => e.id === categories.selectedCategoryId)
.displayName
: __('Trending', 'web-stories');
// We display the media name if there's media to display or a category has
// been selected.
// TODO: Update for Coverr.
const displayMediaName = Boolean(
(unsplash.state.isMediaLoaded && unsplash.state.media) ||
categories.selectedCategoryId
);
// TODO(#2368): handle pagination / infinite scrolling
=======
>>>>>>>
function getProviderMediaAndCategories(providerType) {
const wrapperProps =
providerType === selectedProvider
? { className: 'provider-selected' }
: { 'aria-hidden': 'true' };
const state = media3p[providerType].state;
const actions = media3p[providerType].actions;
const displayName = state.categories.selectedCategoryId
? state.categories.categories.find(
(e) => e.id === state.categories.selectedCategoryId
).displayName
: __('Trending', 'web-stories');
// We display the media name if there's media to display or a category has
// been selected.
// TODO: Update for Coverr.
const shouldDisplayMediaName = Boolean(
(state.isMediaLoaded && state.media) ||
state.categories.selectedCategoryId
);
return (
<ProviderMediaCategoriesWrapper
dataProvider={providerType}
{...wrapperProps}
key={`provider-bottom-wrapper-${providerType}`}
>
{PROVIDERS[providerType].supportsCategories && (
<>
<Media3pCategories
categories={state.categories.categories}
selectedCategoryId={state.categories.selectedCategoryId}
selectCategory={actions.selectCategory}
deselectCategory={actions.deselectCategory}
/>
<MediaDisplayName shouldDisplay={shouldDisplayMediaName}>
{displayName}
</MediaDisplayName>
</>
)}
<PaginatedMediaGallery
providerType={providerType}
resources={state.media}
isMediaLoading={state.isMediaLoading}
isMediaLoaded={state.isMediaLoaded}
hasMore={state.hasMore}
setNextPage={actions.setNextPage}
onInsert={insertMediaElement}
/>
</ProviderMediaCategoriesWrapper>
);
}
// TODO(#2368): handle pagination / infinite scrolling
<<<<<<<
<Media3pCategories
categories={categories.categories}
selectedCategoryId={categories.selectedCategoryId}
selectCategory={selectCategory}
deselectCategory={deselectCategory}
/>
<MediaDisplayName shouldDisplay={displayMediaName}>
{displayName}
</MediaDisplayName>
=======
>>>>>>> |
<<<<<<<
if (chart.options.chart.preserveAspectRatio && this.coll === 'yAxis' && xAxis.transA !== undefined) {
=======
if (preserveAspectRatio) {
>>>>>>>
if (preserveAspectRatio) {
<<<<<<<
searchPoint: Highcharts.noop,
=======
searchPoint: noop,
preserveAspectRatio: true, // X axis and Y axis must have same translation slope
>>>>>>>
searchPoint: Highcharts.noop,
preserveAspectRatio: true, // X axis and Y axis must have same translation slope
<<<<<<<
Highcharts.each(this.points, function (point) {
point.graphic
.attr(level.shapeArgs)
.animate({
scaleX: 1,
scaleY: 1,
translateX: 0,
translateY: 0
}, animationOptions);
=======
each(this.points, function (point) {
if (point.graphic) {
point.graphic
.attr(level.shapeArgs)
.animate({
scaleX: 1,
scaleY: 1,
translateX: 0,
translateY: 0
}, animationOptions);
}
>>>>>>>
Highcharts.each(this.points, function (point) {
if (point.graphic) {
point.graphic
.attr(level.shapeArgs)
.animate({
scaleX: 1,
scaleY: 1,
translateX: 0,
translateY: 0
}, animationOptions);
} |
<<<<<<<
loading: {
primary: '#4285F4',
secondary: '#15D8FD',
},
=======
link: '#4285f4',
>>>>>>>
loading: {
primary: '#4285F4',
secondary: '#15D8FD',
},
link: '#4285f4', |
<<<<<<<
points = series.points,
options = series.options.dataLabels,
=======
data = series.data,
seriesOptions = series.options,
options = seriesOptions.dataLabels,
>>>>>>>
points = series.points,
seriesOptions = series.options,
options = seriesOptions.dataLabels,
<<<<<<<
if (isBarLike && series.options.stacking) {
=======
/*if (series.isCartesian) {
dataLabel[chart.isInsidePlot(plotX, plotY) ? 'show' : 'hide']();
}*/
if (isBarLike && seriesOptions.stacking && dataLabel) {
>>>>>>>
if (isBarLike && seriesOptions.stacking && dataLabel) { |
<<<<<<<
attr: function(hash, val) {
var wrapper = this,
key,
value,
result,
i,
=======
attr: function (hash, val) {
var key,
value,
i,
>>>>>>>
attr: function (hash, val) {
var wrapper = this,
key,
value,
result,
i,
<<<<<<<
// paths
if (key === 'd') {
if (value && value.join) { // join path
value = value.join(' ');
=======
this.d = value; // shortcut for animations
// update child tspans x values
} else if (key === 'x' && nodeName === 'text') {
for (i = 0; i < element.childNodes.length; i++) {
child = element.childNodes[i];
// if the x values are equal, the tspan represents a linebreak
if (attr(child, 'x') === attr(element, 'x')) {
//child.setAttribute('x', value);
attr(child, 'x', value);
>>>>>>>
// paths
if (key === 'd') {
if (value && value.join) { // join path
value = value.join(' ');
<<<<<<<
// Chrome/Win < 6 bug (http://code.google.com/p/chromium/issues/detail?id=15461)
if (isWebKit && key === 'stroke-width' && value === 0) {
value = 0.000001;
=======
if (this.rotation) {
attr(element, 'transform', 'rotate(' + this.rotation + ' ' + value + ' ' +
pInt(hash.y || attr(element, 'y')) + ')');
>>>>>>>
// Chrome/Win < 6 bug (http://code.google.com/p/chromium/issues/detail?id=15461)
if (isWebKit && key === 'stroke-width' && value === 0) {
value = 0.000001;
<<<<<<<
each(['x', 'y', 'r', 'start', 'end', 'width', 'height', 'innerR', 'anchorX', 'anchorY'], function(key) {
=======
each(['x', 'y', 'r', 'start', 'end', 'width', 'height', 'innerR'], function (key) {
>>>>>>>
each(['x', 'y', 'r', 'start', 'end', 'width', 'height', 'innerR', 'anchorX', 'anchorY'], function (key) {
<<<<<<<
wrapper.attr({
d: wrapper.renderer.symbols[wrapper.symbolName](wrapper.x, wrapper.y, wrapper.width, wrapper.height, wrapper)
=======
wrapper.attr({
d: wrapper.renderer.symbols[wrapper.symbolName](
mathRound(wrapper.x * 2) / 2, // Round to halves. Issue #274.
mathRound(wrapper.y * 2) / 2,
wrapper.r,
{
start: wrapper.start,
end: wrapper.end,
width: wrapper.width,
height: wrapper.height,
innerR: wrapper.innerR
}
)
>>>>>>>
wrapper.attr({
d: wrapper.renderer.symbols[wrapper.symbolName](wrapper.x, wrapper.y, wrapper.width, wrapper.height, wrapper)
<<<<<<<
crisp: function(strokeWidth, x, y, width, height) {
=======
crisp: function (strokeWidth, x, y, width, height) {
>>>>>>>
crisp: function (strokeWidth, x, y, width, height) {
<<<<<<<
getBBox: function() {
=======
getBBox: function () {
>>>>>>>
getBBox: function () {
<<<<<<<
*/
add: function(parent) {
=======
*/
add: function (parent) {
>>>>>>>
*/
add: function (parent) {
<<<<<<<
each(lines, function(line, lineNo) {
=======
each(lines, function (line, lineNo) {
>>>>>>>
each(lines, function (line, lineNo) {
<<<<<<<
symbol: function(symbol, x, y, width, height, options) {
=======
symbol: function (symbol, x, y, radius, options) {
>>>>>>>
symbol: function (symbol, x, y, width, height, options) {
<<<<<<<
var centerImage = function(img, size) {
=======
var centerImage = function (img, size) {
>>>>>>>
var centerImage = function (img, size) {
<<<<<<<
M, x + w / 2, y,
'C', x + w + cpw, y, x + w + cpw, y + h, x + w / 2, y + h,
'C', x - cpw, y + h, x - cpw, y, x + w / 2, y,
=======
M, x - len, y - len,
L, x + len, y - len,
x + len, y + len,
x - len, y + len,
>>>>>>>
M, x + w / 2, y,
'C', x + w + cpw, y, x + w + cpw, y + h, x + w / 2, y + h,
'C', x - cpw, y + h, x - cpw, y, x + w / 2, y,
<<<<<<<
M, x, y,
L, x + w, y,
x + w, y + h,
x, y + h,
=======
M, x, y - 1.33 * radius,
L, x + radius, y + 0.67 * radius,
x - radius, y + 0.67 * radius,
>>>>>>>
M, x, y,
L, x + w, y,
x + w, y + h,
x, y + h,
<<<<<<<
M, x, y,
L, x + w, y,
x + w / 2, y + h,
=======
M, x, y + 1.33 * radius,
L, x - radius, y - 0.67 * radius,
x + radius, y - 0.67 * radius,
>>>>>>>
M, x, y,
L, x + w, y,
x + w / 2, y + h,
<<<<<<<
M, x + w / 2, y,
L, x + w, y + h / 2,
x + w / 2, y + h,
x, y + h / 2,
=======
M, x, y - radius,
L, x + radius, y,
x, y + radius,
x - radius, y,
>>>>>>>
M, x + w / 2, y,
L, x + w, y + h / 2,
x + w / 2, y + h,
x, y + h / 2,
<<<<<<<
each(color.stops, function(stop) {
=======
each(color.stops, function (stop) {
>>>>>>>
each(color.stops, function (stop) {
<<<<<<<
return 'url('+ this.url +'#'+ id +')';
=======
return 'url(' + this.url + '#' + id + ')';
>>>>>>>
return 'url(' + this.url + '#' + id + ')';
<<<<<<<
attr(elem, prop +'-opacity', colorObject.get('a'));
=======
attr(elem, prop + '-opacity', colorObject.get('a'));
>>>>>>>
attr(elem, prop + '-opacity', colorObject.get('a'));
<<<<<<<
text: function(str, x, y) {
=======
text: function (str, x, y) {
>>>>>>>
text: function (str, x, y) { |
<<<<<<<
H.VMLElement = VMLElement = extendClass(SVGElement, VMLElement);
=======
VMLElement['stroke-opacitySetter'] = VMLElement['fill-opacitySetter'];
Highcharts.VMLElement = VMLElement = extendClass(SVGElement, VMLElement);
>>>>>>>
H.VMLElement = VMLElement = extendClass(SVGElement, VMLElement);
VMLElement['stroke-opacitySetter'] = VMLElement['fill-opacitySetter'];
<<<<<<<
'M',
x,// - innerRadius,
=======
M,
x, // - innerRadius,
>>>>>>>
'M',
x,// - innerRadius, |
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
each(this.points, function (point) {
point.graphic[func](this.colorAttribs(point));
=======
this.points.forEach(function (point) {
/*= if (build.classic) { =*/
point.graphic.attr(this.colorAttribs(point));
/*= } else { =*/
// In styled mode, use CSS, otherwise the fill used in the style
// sheet will take precedence over the fill attribute.
point.graphic.css(this.colorAttribs(point));
/*= } =*/
>>>>>>>
this.points.forEach(function (point) {
point.graphic[func](this.colorAttribs(point)); |
<<<<<<<
var pointX = point.x,
pointY = point.y,
x = pointX - boxWidth + outerLeft - distance,
y = pointY - boxHeight + outerTop + 15, // 15 means the point is 15 pixels up from the bottom of the tooltip
alignedRight;
=======
var pointX = point.x,
pointY = point.y,
x = pointX - boxWidth + outerLeft - 25,
y = pointY - boxHeight + outerTop + 10,
alignedRight;
>>>>>>>
var pointX = point.x,
pointY = point.y,
x = pointX - boxWidth + outerLeft - distance,
y = pointY - boxHeight + outerTop + 15, // 15 means the point is 15 pixels up from the bottom of the tooltip
alignedRight;
<<<<<<<
x = outerLeft + pointX + distance;
=======
x = outerLeft + pointX + 15;
>>>>>>>
x = outerLeft + pointX + distance;
<<<<<<<
* The time unit lookup
*/
/*jslint white: true*/
timeUnits = hash(
MILLISECOND, 1,
SECOND, 1000,
MINUTE, 60000,
HOUR, 3600000,
DAY, 24 * 3600000,
WEEK, 7 * 24 * 3600000,
MONTH, 30 * 24 * 3600000,
YEAR, 31556952000
);
/*jslint white: false*/
/**
=======
* Utility method that destroys any SVGElement or VMLElement that are properties on the given object.
* It loops all properties and invokes destroy if there is a destroy method. The property is
* then delete'ed.
*/
function destroyObjectProperties(obj) {
var n;
for (n in obj) {
// If the object is non-null and destroy is defined
if (obj[n] && obj[n].destroy) {
// Invoke the destroy
obj[n].destroy();
}
// Delete the property from the object.
delete obj[n];
}
}
/**
>>>>>>>
* Utility method that destroys any SVGElement or VMLElement that are properties on the given object.
* It loops all properties and invokes destroy if there is a destroy method. The property is
* then delete'ed.
*/
function destroyObjectProperties(obj) {
var n;
for (n in obj) {
// If the object is non-null and destroy is defined
if (obj[n] && obj[n].destroy) {
// Invoke the destroy
obj[n].destroy();
}
// Delete the property from the object.
delete obj[n];
}
}
/**
* The time unit lookup
*/
/*jslint white: true*/
timeUnits = hash(
MILLISECOND, 1,
SECOND, 1000,
MINUTE, 60000,
HOUR, 3600000,
DAY, 24 * 3600000,
WEEK, 7 * 24 * 3600000,
MONTH, 30 * 24 * 3600000,
YEAR, 31556952000
);
/*jslint white: false*/
/**
<<<<<<<
function Axis(options) {
=======
function Axis(userOptions) {
>>>>>>>
function Axis(userOptions) {
<<<<<<<
series: [], // populated by Series
stacks: stacks
=======
stacks: stacks,
destroy: destroy
>>>>>>>
series: [], // populated by Series
stacks: stacks,
destroy: destroy
<<<<<<<
addEvent(doc, 'mousemove', function (e) {
if (e.event) {
e = e.event; // MooTools renames e.pageX to e.page.x
}
if (chartPosition &&
!isInsidePlot(e.pageX - chartPosition.left - plotLeft,
e.pageY - chartPosition.top - plotTop)) {
resetTracker();
}
});
=======
addEvent(doc, 'mousemove', hideTooltipOnMouseMove);
>>>>>>>
addEvent(doc, 'mousemove', hideTooltipOnMouseMove);
<<<<<<<
resetTracker: resetTracker,
normalizeMouseEvent: normalizeMouseEvent
=======
resetTracker: resetTracker,
destroy: destroy
>>>>>>>
resetTracker: resetTracker,
normalizeMouseEvent: normalizeMouseEvent,
destroy: destroy
<<<<<<<
rightPadding = 20,
=======
>>>>>>>
<<<<<<<
each(optionsArray, function (axisOptions) {
axis = new Axis(axisOptions);
=======
// loop the options and construct axis objects
chart.xAxis = [];
chart.yAxis = [];
axes = map(axes, function (axisOptions) {
axis = new Axis(axisOptions);
chart[axis.isXAxis ? 'xAxis' : 'yAxis'].push(axis);
return axis;
>>>>>>>
each(optionsArray, function (axisOptions) {
axis = new Axis(axisOptions);
<<<<<<<
=======
chart = null;
>>>>>>>
chart = null;
<<<<<<<
i = data.length;
while (i--) {
point = data[i];
if (point && point.destroy) {
point.destroy();
}
}
series.points = null;
=======
each(series.data, function (point) {
point.destroy();
});
// If this series clipRect is not the global one (which is removed on chart.destroy) we
// destroy it here.
if (seriesClipRect && seriesClipRect !== chart.clipRect) {
series.clipRect = seriesClipRect.destroy();
}
>>>>>>>
i = data.length;
while (i--) {
point = data[i];
if (point && point.destroy) {
point.destroy();
}
}
series.points = null;
// If this series clipRect is not the global one (which is removed on chart.destroy) we
// destroy it here.
if (seriesClipRect && seriesClipRect !== chart.clipRect) {
series.clipRect = seriesClipRect.destroy();
} |
<<<<<<<
date = (pointIntervalUnit === 'month') ?
+date[Date.hcSetMonth](date[Date.hcGetMonth]() + pointInterval) :
+date[Date.hcSetFullYear](date[Date.hcGetFullYear]() + pointInterval);
=======
if (pointIntervalUnit === 'day') {
date = +date[setDate](date[getDate]() + pointInterval);
} else if (pointIntervalUnit === 'month') {
date = +date[setMonth](date[getMonth]() + pointInterval);
} else if (pointIntervalUnit === 'year') {
date = +date[setFullYear](date[getFullYear]() + pointInterval);
}
>>>>>>>
if (pointIntervalUnit === 'day') {
date = +date[Date.hcSetDate](date[Date.hcGetDate]() + pointInterval);
} else if (pointIntervalUnit === 'month') {
date = +date[Date.hcSetMonth](date[Date.hcGetMonth]() + pointInterval);
} else if (pointIntervalUnit === 'year') {
date = +date[Date.hcSetFullYear](date[Date.hcGetFullYear]() + pointInterval);
}
<<<<<<<
point.plotX = plotX = Math.min(Math.max(-1e5, xAxis.translate(xValue, 0, 0, 0, 1, pointPlacement, this.type === 'flags')), 1e5); // #3923
=======
point.plotX = plotX = correctFloat( // #5236
mathMin(mathMax(-1e5, xAxis.translate(xValue, 0, 0, 0, 1, pointPlacement, this.type === 'flags')), 1e5) // #3923
);
>>>>>>>
point.plotX = plotX = correctFloat( // #5236
Math.min(Math.max(-1e5, xAxis.translate(xValue, 0, 0, 0, 1, pointPlacement, this.type === 'flags')), 1e5) // #3923
);
<<<<<<<
point.plotY = plotY = !point.isNull ?
Math.min(Math.max(-1e5, yAxis.translate(yValue, 0, 1, 0, 1)), 1e5) : // #3201
undefined;
point.isInside = plotY !== undefined && plotY >= 0 && plotY <= yAxis.len && // #3519
=======
point.plotY = plotY = (typeof yValue === 'number' && yValue !== Infinity) ?
mathMin(mathMax(-1e5, yAxis.translate(yValue, 0, 1, 0, 1)), 1e5) : // #3201
UNDEFINED;
point.isInside = plotY !== UNDEFINED && plotY >= 0 && plotY <= yAxis.len && // #3519
>>>>>>>
point.plotY = plotY = (typeof yValue === 'number' && yValue !== Infinity) ?
Math.min(Math.max(-1e5, yAxis.translate(yValue, 0, 1, 0, 1)), 1e5) : // #3201
undefined;
point.isInside = plotY !== undefined && plotY >= 0 && plotY <= yAxis.len && // #3519
<<<<<<<
// Only draw the point if y is defined
if (enabled && plotY !== undefined && !isNaN(plotY) && point.y !== null) {
=======
// only draw the point if y is defined
if (enabled && isNumber(plotY) && point.y !== null) {
>>>>>>>
// only draw the point if y is defined
if (enabled && isNumber(plotY) && point.y !== null) {
<<<<<<<
pointAttribs: function (point, state) {
var seriesMarkerOptions = this.options.marker,
seriesStateOptions,
pointMarkerOptions = (point && point.options && point.options.marker) || {},
pointStateOptions,
strokeWidth = seriesMarkerOptions.lineWidth,
color = this.color,
pointColorOption = point && point.options.color,
pointColor = point && point.color,
zoneColor,
fill,
stroke,
zone;
if (point && this.zones.length) {
zone = point.getZone();
if (zone && zone.color) {
zoneColor = zone.color;
}
}
=======
getAttribs: function () {
var series = this,
seriesOptions = series.options,
normalOptions = defaultPlotOptions[series.type].marker ? seriesOptions.marker : seriesOptions,
stateOptions = normalOptions.states,
stateOptionsHover = stateOptions[HOVER_STATE],
pointStateOptionsHover,
seriesColor = series.color,
seriesNegativeColor = series.options.negativeColor,
normalDefaults = {
stroke: seriesColor,
fill: seriesColor
},
points = series.points || [], // #927
i,
j,
threshold,
point,
seriesPointAttr = [],
pointAttr,
pointAttrToOptions = series.pointAttrToOptions,
hasPointSpecificOptions = series.hasPointSpecificOptions,
defaultLineColor = normalOptions.lineColor,
defaultFillColor = normalOptions.fillColor,
turboThreshold = seriesOptions.turboThreshold,
zones = series.zones,
zoneAxis = series.zoneAxis || 'y',
zoneColor,
attr,
key;
// series type specific modifications
if (seriesOptions.marker) { // line, spline, area, areaspline, scatter
// if no hover radius is given, default to normal radius + 2
stateOptionsHover.radius = stateOptionsHover.radius || normalOptions.radius + stateOptionsHover.radiusPlus;
stateOptionsHover.lineWidth = stateOptionsHover.lineWidth || normalOptions.lineWidth + stateOptionsHover.lineWidthPlus;
} else { // column, bar, pie
// if no hover color is given, brighten the normal color
stateOptionsHover.color = stateOptionsHover.color ||
Color(stateOptionsHover.color || seriesColor)
.brighten(stateOptionsHover.brightness).get();
// if no hover negativeColor is given, brighten the normal negativeColor
stateOptionsHover.negativeColor = stateOptionsHover.negativeColor ||
Color(stateOptionsHover.negativeColor || seriesNegativeColor)
.brighten(stateOptionsHover.brightness).get();
}
// general point attributes for the series normal state
seriesPointAttr[NORMAL_STATE] = series.convertAttribs(normalOptions, normalDefaults);
// HOVER_STATE and SELECT_STATE states inherit from normal state except the default radius
each([HOVER_STATE, SELECT_STATE], function (state) {
seriesPointAttr[state] =
series.convertAttribs(stateOptions[state], seriesPointAttr[NORMAL_STATE]);
});
// set it
series.pointAttr = seriesPointAttr;
// Generate the point-specific attribute collections if specific point
// options are given. If not, create a referance to the series wide point
// attributes
i = points.length;
if (!turboThreshold || i < turboThreshold || hasPointSpecificOptions) {
while (i--) {
point = points[i];
normalOptions = (point.options && point.options.marker) || point.options;
if (normalOptions && normalOptions.enabled === false) {
normalOptions.radius = 0;
}
zoneColor = null;
if (zones.length) {
j = 0;
threshold = zones[j];
while (point[zoneAxis] >= threshold.value) {
threshold = zones[++j];
}
point.color = point.fillColor = zoneColor = pick(threshold.color, series.color); // #3636, #4267, #4430 - inherit color from series, when color is undefined
}
hasPointSpecificOptions = seriesOptions.colorByPoint || point.color; // #868
// check if the point has specific visual options
if (point.options) {
for (key in pointAttrToOptions) {
if (defined(normalOptions[pointAttrToOptions[key]])) {
hasPointSpecificOptions = true;
}
}
}
// a specific marker config object is defined for the individual point:
// create it's own attribute collection
if (hasPointSpecificOptions) {
normalOptions = normalOptions || {};
pointAttr = [];
stateOptions = normalOptions.states || {}; // reassign for individual point
pointStateOptionsHover = stateOptions[HOVER_STATE] = stateOptions[HOVER_STATE] || {};
// Handle colors for column and pies
if (!seriesOptions.marker || (point.negative && !pointStateOptionsHover.fillColor && !stateOptionsHover.fillColor)) { // column, bar, point or negative threshold for series with markers (#3636)
// If no hover color is given, brighten the normal color. #1619, #2579
pointStateOptionsHover[series.pointAttrToOptions.fill] = pointStateOptionsHover.color || (!point.options.color && stateOptionsHover[(point.negative && seriesNegativeColor ? 'negativeColor' : 'color')]) ||
Color(point.color)
.brighten(pointStateOptionsHover.brightness || stateOptionsHover.brightness)
.get();
}
// normal point state inherits series wide normal state
attr = { color: point.color }; // #868
if (!defaultFillColor) { // Individual point color or negative color markers (#2219)
attr.fillColor = point.color;
}
if (!defaultLineColor) {
attr.lineColor = point.color; // Bubbles take point color, line markers use white
}
// Color is explicitly set to null or undefined (#1288, #4068)
if (normalOptions.hasOwnProperty('color') && !normalOptions.color) {
delete normalOptions.color;
}
// When zone is set, but series.states.hover.color is not set, apply zone color on hover, #4670:
if (zoneColor && !stateOptionsHover.fillColor) {
pointStateOptionsHover.fillColor = zoneColor;
}
pointAttr[NORMAL_STATE] = series.convertAttribs(extend(attr, normalOptions), seriesPointAttr[NORMAL_STATE]);
// inherit from point normal and series hover
pointAttr[HOVER_STATE] = series.convertAttribs(
stateOptions[HOVER_STATE],
seriesPointAttr[HOVER_STATE],
pointAttr[NORMAL_STATE]
);
// inherit from point normal and series hover
pointAttr[SELECT_STATE] = series.convertAttribs(
stateOptions[SELECT_STATE],
seriesPointAttr[SELECT_STATE],
pointAttr[NORMAL_STATE]
);
>>>>>>>
pointAttribs: function (point, state) {
var seriesMarkerOptions = this.options.marker,
seriesStateOptions,
pointMarkerOptions = (point && point.options && point.options.marker) || {},
pointStateOptions,
strokeWidth = seriesMarkerOptions.lineWidth,
color = this.color,
pointColorOption = point && point.options.color,
pointColor = point && point.color,
zoneColor,
fill,
stroke,
zone;
if (point && this.zones.length) {
zone = point.getZone();
if (zone && zone.color) {
zoneColor = zone.color;
}
} |
<<<<<<<
* Default options for the X axis - the Y axis has extended defaults
* @optionparent xAxis
=======
* Default options for the X axis - the Y axis has extended defaults.
*
* @private
* @type {Object}
>>>>>>>
* Default options for the X axis - the Y axis has extended defaults.
* @optionparent xAxis
<<<<<<<
* This options set extends the defaultOptions for Y axes
* @extends xAxis
* @optionparent yAxis
=======
* This options set extends the defaultOptions for Y axes.
*
* @private
* @type {Object}
>>>>>>>
* This option set extends the defaultOptions for Y axes.
* @extends xAxis
* @optionparent yAxis |
<<<<<<<
onContainerMouseLeave: function () {
var chart = charts[H.hoverChartIndex];
if (chart) {
=======
onContainerMouseLeave: function (e) {
var chart = charts[hoverChartIndex];
if (chart && (e.relatedTarget || e.toElement)) { // #4886, MS Touch end fires mouseleave but with no related target
>>>>>>>
onContainerMouseLeave: function (e) {
var chart = charts[H.hoverChartIndex];
if (chart && (e.relatedTarget || e.toElement)) { // #4886, MS Touch end fires mouseleave but with no related target
<<<<<<<
H.hoverChartIndex = chart.index;
=======
if (!defined(hoverChartIndex) || !charts[hoverChartIndex].mouseIsDown) {
hoverChartIndex = chart.index;
}
>>>>>>>
if (!defined(H.hoverChartIndex) || !charts[H.hoverChartIndex].mouseIsDown) {
H.hoverChartIndex = chart.index;
}
<<<<<<<
if (series && !series.options.stickyTracking &&
!this.inClass(relatedTarget, 'highcharts-tooltip') &&
!this.inClass(relatedTarget, 'highcharts-series-' + series.index)) { // #2499, #4465
=======
if (series && relatedTarget && !series.options.stickyTracking && // #4886
!this.inClass(relatedTarget, PREFIX + 'tooltip') &&
!this.inClass(relatedTarget, PREFIX + 'series-' + series.index)) { // #2499, #4465
>>>>>>>
if (series && relatedTarget && !series.options.stickyTracking &&
!this.inClass(relatedTarget, 'highcharts-tooltip') &&
!this.inClass(relatedTarget, 'highcharts-series-' + series.index)) { // #2499, #4465 |
<<<<<<<
origRatio: origWidth / origHeight,
width: 20,
height: 10,
=======
width: 200,
height: 100,
>>>>>>>
origRatio: origWidth / origHeight,
width: 200,
height: 100, |
<<<<<<<
// Update methods, shortcut to Chart.setTitle // docs. Sample created
chart[name].update = function (o) {
chart.setTitle(!i && o, i && o);
};
=======
>>>>>>>
// Update methods, shortcut to Chart.setTitle // docs. Sample created
chart[name].update = function (o) {
chart.setTitle(!i && o, i && o);
};
<<<<<<<
// Lay out the title and the subtitle respectively
each(['title', 'subtitle'], function (key) {
var title = this[key],
titleOptions = this.options[key],
titleSize;
if (title) {
/*= if (build.classic) { =*/
titleSize = titleOptions.style.fontSize;
/*= } =*/
titleSize = renderer.fontMetrics(titleSize, title).b;
title
.css({ width: (titleOptions.width || autoWidth) + 'px' })
.align(extend({
y: titleOffset + titleSize + (key === 'title' ? -3 : 2)
}, titleOptions), false, 'spacingBox');
if (!titleOptions.floating && !titleOptions.verticalAlign) {
titleOffset = Math.ceil(titleOffset + title.getBBox().height);
}
=======
if (title) {
title
.css({ width: (titleOptions.width || spacingBox.width + titleOptions.widthAdjust) + PX })
.align(extend({
y: renderer.fontMetrics(titleOptions.style.fontSize, title).b - 3
}, titleOptions), false, spacingBox);
if (!titleOptions.floating && !titleOptions.verticalAlign) {
titleOffset = title.getBBox().height;
}
}
if (subtitle) {
subtitle
.css({ width: (subtitleOptions.width || spacingBox.width + subtitleOptions.widthAdjust) + PX })
.align(extend({
y: titleOffset + (titleOptions.margin - 13) + renderer.fontMetrics(subtitleOptions.style.fontSize, title).b
}, subtitleOptions), false, spacingBox);
if (!subtitleOptions.floating && !subtitleOptions.verticalAlign) {
titleOffset = mathCeil(titleOffset + subtitle.getBBox().height);
>>>>>>>
// Lay out the title and the subtitle respectively
each(['title', 'subtitle'], function (key) {
var title = this[key],
titleOptions = this.options[key],
titleSize;
if (title) {
/*= if (build.classic) { =*/
titleSize = titleOptions.style.fontSize;
/*= } =*/
titleSize = renderer.fontMetrics(titleSize, title).b;
title
.css({ width: (titleOptions.width || spacingBox.width + titleOptions.widthAdjust) + 'px' })
.align(extend({
y: titleOffset + titleSize + (key === 'title' ? -3 : 2)
}, titleOptions), false, 'spacingBox');
if (!titleOptions.floating && !titleOptions.verticalAlign) {
titleOffset = Math.ceil(titleOffset + title.getBBox().height);
} |
<<<<<<<
var isNumber = H.isNumber,
=======
var each = H.each,
isNumber = H.isNumber,
>>>>>>>
var isNumber = H.isNumber,
<<<<<<<
=======
/*= if (build.classic) { =*/
// Presentational
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>> |
<<<<<<<
import '../../Stock/Indicators/SupertrendIndicator.js';
import '../../Stock/Indicators/VBP/VBPIndicator.js';
=======
import '../../Stock/Indicators/Supertrend/SupertrendIndicator.js';
import '../../Stock/Indicators/VBPIndicator.js';
>>>>>>>
import '../../Stock/Indicators/Supertrend/SupertrendIndicator.js';
import '../../Stock/Indicators/VBP/VBPIndicator.js'; |
<<<<<<<
taskName: 'New offices',
id: 'new_offices'
=======
name: 'New offices',
id: 'new_offices',
start: today - 2 * day,
end: today + 14 * day
>>>>>>>
name: 'New offices',
id: 'new_offices'
<<<<<<<
taskName: 'New product launch',
id: 'new_product'
=======
name: 'New product launch',
id: 'new_product',
start: today - day,
end: today + 18 * day
>>>>>>>
name: 'New product launch',
id: 'new_product' |
<<<<<<<
// reset stacks
if (!axis.isXAxis) {
for (type in stacks) {
for (i in stacks[type]) {
stacks[type][i].total = null;
stacks[type][i].cum = stacks[type][i].leftCliff = stacks[type][i].rightCliff = 0;
}
}
=======
if (axis.resetStacks) {
axis.resetStacks();
>>>>>>>
if (axis.resetStacks) {
axis.resetStacks();
<<<<<<<
if (y !== null) {
stack.points[pointKey] = stack.points[series.index] = [pick(stack.cum, stackThreshold)];
}
=======
//stack.points[pointKey] = [stack.cum || stackThreshold];
stack.points[pointKey] = [pick(stack.cum, stackThreshold)];
stack.touched = yAxis.stacksTouched;
>>>>>>>
if (y !== null) {
stack.points[pointKey] = stack.points[series.index] = [pick(stack.cum, stackThreshold)];
stack.touched = yAxis.stacksTouched;
} |
<<<<<<<
var addEvent = U.addEvent, animObject = U.animObject, arrayMax = U.arrayMax, arrayMin = U.arrayMin, clamp = U.clamp, correctFloat = U.correctFloat, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, extend = U.extend, fireEvent = U.fireEvent, isArray = U.isArray, isNumber = U.isNumber, isString = U.isString, merge = U.merge, objectEach = U.objectEach, pick = U.pick, relativeLength = U.relativeLength, removeEvent = U.removeEvent, splat = U.splat, syncTimeout = U.syncTimeout;
import './Color.js';
=======
var addEvent = U.addEvent, animObject = U.animObject, arrayMax = U.arrayMax, arrayMin = U.arrayMin, clamp = U.clamp, correctFloat = U.correctFloat, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, extend = U.extend, fireEvent = U.fireEvent, isArray = U.isArray, isNumber = U.isNumber, isString = U.isString, objectEach = U.objectEach, pick = U.pick, relativeLength = U.relativeLength, removeEvent = U.removeEvent, splat = U.splat, syncTimeout = U.syncTimeout;
>>>>>>>
var addEvent = U.addEvent, animObject = U.animObject, arrayMax = U.arrayMax, arrayMin = U.arrayMin, clamp = U.clamp, correctFloat = U.correctFloat, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, extend = U.extend, fireEvent = U.fireEvent, isArray = U.isArray, isNumber = U.isNumber, isString = U.isString, merge = U.merge, objectEach = U.objectEach, pick = U.pick, relativeLength = U.relativeLength, removeEvent = U.removeEvent, splat = U.splat, syncTimeout = U.syncTimeout;
<<<<<<<
import './Tick.js';
var color = H.color, defaultOptions = H.defaultOptions, deg2rad = H.deg2rad, format = H.format, getMagnitude = H.getMagnitude, normalizeTickInterval = H.normalizeTickInterval, Tick = H.Tick;
=======
var defaultOptions = H.defaultOptions, deg2rad = H.deg2rad, format = H.format, getMagnitude = H.getMagnitude, merge = H.merge, normalizeTickInterval = H.normalizeTickInterval;
>>>>>>>
var defaultOptions = H.defaultOptions, deg2rad = H.deg2rad, format = H.format, getMagnitude = H.getMagnitude, normalizeTickInterval = H.normalizeTickInterval; |
<<<<<<<
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4, // issue #38
=======
hasRtlBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4, // issue #38
useCanVG = !hasSVG && !isIE && !!doc.createElement('canvas').getContext,
>>>>>>>
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4, // issue #38
useCanVG = !hasSVG && !isIE && !!doc.createElement('canvas').getContext,
<<<<<<<
if (isXAxis && minRange === UNDEFINED && !isLog) {
=======
if (isXAxis && minRange === UNDEFINED) {
>>>>>>>
if (isXAxis && minRange === UNDEFINED && !isLog) {
<<<<<<<
tickPositions = getTimeTicks(tickInterval, min, max, options.startOfWeek, options.units);
} else if (isLog) {
tickPositions = getLogTickPositions(tickInterval, min, max);
=======
tickPositions = (axis.getNonLinearTimeTicks || getTimeTicks)(
normalizeTimeTickInterval(tickInterval, options.units),
min,
max,
options.startOfWeek,
axis.ordinalPositions,
axis.closestPointRange,
true
);
>>>>>>>
tickPositions = (axis.getNonLinearTimeTicks || getTimeTicks)(
normalizeTimeTickInterval(tickInterval, options.units),
min,
max,
options.startOfWeek,
axis.ordinalPositions,
axis.closestPointRange,
true
);
} else if (isLog) {
tickPositions = getLogTickPositions(tickInterval, min, max); |
<<<<<<<
colorPresets,
=======
publisherLogo,
>>>>>>>
colorPresets,
publisherLogo,
<<<<<<<
color_presets: colorPresets,
=======
publisher_logo: publisherLogo,
>>>>>>>
color_presets: colorPresets,
publisher_logo: publisherLogo, |
<<<<<<<
import U from '../Core/Utilities.js';
=======
import Math3D from '../parts-3d/Math.js';
var perspective = Math3D.perspective;
import U from '../parts/Utilities.js';
>>>>>>>
import Math3D from '../parts-3d/Math.js';
var perspective = Math3D.perspective;
import U from '../Core/Utilities.js'; |
<<<<<<<
var defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, extend = U.extend, isNumber = U.isNumber, objectEach = U.objectEach, pick = U.pick;
var correctFloat = H.correctFloat, fireEvent = H.fireEvent, merge = H.merge, deg2rad = H.deg2rad;
=======
var correctFloat = U.correctFloat, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, extend = U.extend, isNumber = U.isNumber, pick = U.pick;
var fireEvent = H.fireEvent, merge = H.merge, deg2rad = H.deg2rad;
>>>>>>>
var correctFloat = U.correctFloat, defined = U.defined, destroyObjectProperties = U.destroyObjectProperties, extend = U.extend, isNumber = U.isNumber, objectEach = U.objectEach, pick = U.pick;
var fireEvent = H.fireEvent, merge = H.merge, deg2rad = H.deg2rad; |
<<<<<<<
import AST from '../../Core/Renderer/HTML/AST.js';
=======
var doc = H.doc;
>>>>>>>
import AST from '../../Core/Renderer/HTML/AST.js';
var doc = H.doc; |
<<<<<<<
* @license Highcharts JS v5.0-dev (2016-01-26)
=======
* @license Highcharts JS v4.2.3-modified (2016-02-26)
>>>>>>>
* @license Highcharts JS v5.0-dev (2016-03-16)
<<<<<<<
// Translate the tooltip position in 3d space
tooltipPos = perspective([{ x: tooltipPos[0], y: tooltipPos[1], z: z }], chart, false)[0];
point.tooltipPos = [tooltipPos.x, tooltipPos.y];
}
=======
// Translate the tooltip position in 3d space
tooltipPos = perspective([{ x: tooltipPos[0], y: tooltipPos[1], z: z }], chart, true)[0];
point.tooltipPos = [tooltipPos.x, tooltipPos.y];
}
});
// store for later use #4067
series.z = z;
>>>>>>>
// Translate the tooltip position in 3d space
tooltipPos = perspective([{ x: tooltipPos[0], y: tooltipPos[1], z: z }], chart, true)[0];
point.tooltipPos = [tooltipPos.x, tooltipPos.y];
}
<<<<<<<
wrap(seriesTypes.pie.prototype, 'addPoint', function (proceed) {
proceed.apply(this, [].slice.call(arguments, 1));
if (this.chart.is3d()) {
// destroy (and rebuild) everything!!!
this.update(this.userOptions, true); // #3845 pass the old options
}
});
=======
// #4584 Check if has graphic - null points don't have it
if (graphic) {
// Hide null or 0 points (#3006, 3650)
graphic[point.y && point.visible ? 'show' : 'hide']();
}
});
}
});
Highcharts.wrap(Highcharts.seriesTypes.pie.prototype, 'drawDataLabels', function (proceed) {
if (this.chart.is3d()) {
var series = this,
chart = series.chart,
options3d = chart.options.chart.options3d;
each(series.data, function (point) {
var shapeArgs = point.shapeArgs,
r = shapeArgs.r,
a1 = (shapeArgs.alpha || options3d.alpha) * deg2rad, //#3240 issue with datalabels for 0 and null values
b1 = (shapeArgs.beta || options3d.beta) * deg2rad,
a2 = (shapeArgs.start + shapeArgs.end) / 2,
labelPos = point.labelPos,
labelIndexes = [0, 2, 4], // [x1, y1, x2, y2, x3, y3]
yOffset = (-r * (1 - cos(a1)) * sin(a2)), // + (sin(a2) > 0 ? sin(a1) * d : 0)
xOffset = r * (cos(b1) - 1) * cos(a2);
// Apply perspective on label positions
each(labelIndexes, function (index) {
labelPos[index] += xOffset;
labelPos[index + 1] += yOffset;
});
});
}
proceed.apply(this, [].slice.call(arguments, 1));
});
>>>>>>>
wrap(seriesTypes.pie.prototype, 'addPoint', function (proceed) {
proceed.apply(this, [].slice.call(arguments, 1));
if (this.chart.is3d()) {
// destroy (and rebuild) everything!!!
this.update(this.userOptions, true); // #3845 pass the old options
}
}); |
<<<<<<<
* @extends plotOptions.column
* @product highcharts
* @sample {highcharts} highcharts/demo/bullet-graph/ Bullet graph
* @since 6.0.0
* @excluding allAreas,boostThreshold,colorAxis,compare,compareBase
* @optionparent plotOptions.bullet
=======
* @since 6.0.0
>>>>>>>
* @since 6.0.0
<<<<<<<
targetOptions: {
/**
* The width of the rectangle representing the target. Could be set
* as a pixel value or as a percentage of a column width.
*
* @type {Number|String}
* @since 6.0.0
* @product highcharts
*/
width: '140%',
/**
* The height of the rectangle representing the target.
*
* @since 6.0.0
* @product highcharts
*/
height: 3,
/**
* The border color of the rectangle representing the target. When
* not set, the point's border color is used.
*
* In styled mode, use class `highcharts-bullet-target` instead.
*
* @type {Color}
* @since 6.0.0
* @product highcharts
* @apioption plotOptions.bullet.targetOptions.borderColor
*/
/**
* The color of the rectangle representing the target. When not set,
* point's color (if set in point's options -
* [`color`](#series.bullet.data.color)) or zone of the target value
* (if [`zones`](#plotOptions.bullet.zones) or
* [`negativeColor`](#plotOptions.bullet.negativeColor) are set)
* or the same color as the point has is used.
*
* In styled mode, use class `highcharts-bullet-target` instead.
*
* @type {Color}
* @since 6.0.0
* @product highcharts
* @apioption plotOptions.bullet.targetOptions.color
*/
/**
* The border width of the rectangle representing the target.
*
* In styled mode, use class `highcharts-bullet-target` instead.
*
* @since 6.0.0
* @product highcharts
*/
borderWidth: 0
},
tooltip: {
pointFormat: '<span style="color:{series.color}">\u25CF</span>' +
' {series.name}: <b>{point.y}</b>. Target: <b>{point.target}' +
'</b><br/>'
}
}, {
pointArrayMap: ['y', 'target'],
parallelArrays: ['x', 'y', 'target'],
=======
height: 3,
/*= if (build.classic) { =*/
>>>>>>>
height: 3, |
<<<<<<<
color: '${palette.drilldownLabelColor}',
=======
>>>>>>>
color: '${palette.drilldownLabelColor}', |
<<<<<<<
// Pick up numeric values, add index
// Convert Array point definitions to objects using pointArrayMap
if (data) {
data.forEach(function (val, i) {
var ix = 0;
if (isNumber(val)) {
data[i] = {
value: val
};
} else if (isArray(val)) {
data[i] = {};
// Automatically copy first item to hc-key if there is an
// extra leading string
if (
!options.keys &&
val.length > pointArrayMap.length &&
typeof val[0] === 'string'
) {
data[i]['hc-key'] = val[0];
++ix;
}
// Run through pointArrayMap and what's left of the point
// data array in parallel, copying over the values
for (var j = 0; j < pointArrayMap.length; ++j, ++ix) {
if (pointArrayMap[j] && val[ix] !== undefined) {
if (pointArrayMap[j].indexOf('.') > 0) {
H.Point.prototype.setNestedProperty(
data[i], val[ix], pointArrayMap[j]
);
} else {
data[i][pointArrayMap[j]] = val[ix];
=======
// Pick up numeric values, add index
// Convert Array point definitions to objects using pointArrayMap
if (data) {
each(data, function (val, i) {
var ix = 0;
if (isNumber(val)) {
data[i] = {
value: val
};
} else if (isArray(val)) {
data[i] = {};
// Automatically copy first item to hc-key if there is
// an extra leading string
if (
!options.keys &&
val.length > pointArrayMap.length &&
typeof val[0] === 'string'
) {
data[i]['hc-key'] = val[0];
++ix;
}
// Run through pointArrayMap and what's left of the
// point data array in parallel, copying over the values
for (var j = 0; j < pointArrayMap.length; ++j, ++ix) {
if (pointArrayMap[j] && val[ix] !== undefined) {
if (pointArrayMap[j].indexOf('.') > 0) {
H.Point.prototype.setNestedProperty(
data[i], val[ix], pointArrayMap[j]
);
} else {
data[i][pointArrayMap[j]] = val[ix];
}
>>>>>>>
// Pick up numeric values, add index
// Convert Array point definitions to objects using pointArrayMap
if (data) {
data.forEach(function (val, i) {
var ix = 0;
if (isNumber(val)) {
data[i] = {
value: val
};
} else if (isArray(val)) {
data[i] = {};
// Automatically copy first item to hc-key if there is
// an extra leading string
if (
!options.keys &&
val.length > pointArrayMap.length &&
typeof val[0] === 'string'
) {
data[i]['hc-key'] = val[0];
++ix;
}
// Run through pointArrayMap and what's left of the
// point data array in parallel, copying over the values
for (var j = 0; j < pointArrayMap.length; ++j, ++ix) {
if (pointArrayMap[j] && val[ix] !== undefined) {
if (pointArrayMap[j].indexOf('.') > 0) {
H.Point.prototype.setNestedProperty(
data[i], val[ix], pointArrayMap[j]
);
} else {
data[i][pointArrayMap[j]] = val[ix];
}
<<<<<<<
// Registered the point codes that actually hold data
if (data && joinBy[1]) {
data.forEach(function (point) {
if (mapMap[point[joinBy[1]]]) {
dataUsed.push(mapMap[point[joinBy[1]]]);
=======
mapPoint._i = i;
// Copy the property over to root for faster access
if (joinBy[0] && props && props[joinBy[0]]) {
mapPoint[joinBy[0]] = props[joinBy[0]];
>>>>>>>
mapPoint._i = i;
// Copy the property over to root for faster access
if (joinBy[0] && props && props[joinBy[0]]) {
mapPoint[joinBy[0]] = props[joinBy[0]];
<<<<<<<
/**
* Animate in the new series from the clicked point in the old series.
* Depends on the drilldown.js module
*/
animateDrilldown: function (init) {
var toBox = this.chart.plotBox,
level = this.chart.drilldownLevels[
this.chart.drilldownLevels.length - 1
],
fromBox = level.bBox,
animationOptions = this.chart.options.drilldown.animation,
scale;
if (!init) {
scale = Math.min(
fromBox.width / toBox.width,
fromBox.height / toBox.height
);
level.shapeArgs = {
scaleX: scale,
scaleY: scale,
translateX: fromBox.x,
translateY: fromBox.y
};
this.points.forEach(function (point) {
if (point.graphic) {
point.graphic
.attr(level.shapeArgs)
.animate({
scaleX: 1,
scaleY: 1,
translateX: 0,
translateY: 0
}, animationOptions);
}
});
=======
},
>>>>>>>
}, |
<<<<<<<
seriesBarW = series.barW = Math.max(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset,
xCrisp = -(borderWidth % 2 ? 0.5 : 0),
yCrisp = borderWidth % 2 ? 0.5 : 1;
=======
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset;
>>>>>>>
seriesBarW = series.barW = Math.max(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset;
<<<<<<<
var yBottom = pick(point.yBottom, translatedThreshold),
safeDistance = 999 + Math.abs(yBottom),
plotY = Math.min(Math.max(-safeDistance, point.plotY), yAxis.len + safeDistance), // Don't draw too far outside plot area (#1303, #2241, #4264)
=======
var yBottom = mathMin(pick(point.yBottom, translatedThreshold), 9e4), // #3575
safeDistance = 999 + mathAbs(yBottom),
plotY = mathMin(mathMax(-safeDistance, point.plotY), yAxis.len + safeDistance), // Don't draw too far outside plot area (#1303, #2241, #4264)
>>>>>>>
var yBottom = pick(point.yBottom, translatedThreshold),
safeDistance = 999 + Math.abs(yBottom),
plotY = Math.min(Math.max(-safeDistance, point.plotY), yAxis.len + safeDistance), // Don't draw too far outside plot area (#1303, #2241, #4264)
<<<<<<<
barY = Math.min(plotY, yBottom),
right,
bottom,
fromTop,
=======
barY = mathMin(plotY, yBottom),
>>>>>>>
barY = Math.min(plotY, yBottom),
<<<<<<<
barY =
Math.round(Math.abs(barY - translatedThreshold) > minPointLength ? // stacked
=======
barY = mathAbs(barY - translatedThreshold) > minPointLength ? // stacked
>>>>>>>
barY = Math.abs(barY - translatedThreshold) > minPointLength ? // stacked
<<<<<<<
// Round off to obtain crisp edges and avoid overlapping with neighbours (#2694)
right = Math.round(barX + barW) + xCrisp;
barX = Math.round(barX) + xCrisp;
barW = right - barX;
fromTop = Math.abs(barY) <= 0.5; // #4504
bottom = Math.min(Math.round(barY + barH) + yCrisp, 9e4); // #3575
barY = Math.round(barY) + yCrisp;
barH = bottom - barY;
// Top edges are exceptions
if (fromTop) {
barY -= 1;
barH += 1;
}
=======
>>>>>>> |
<<<<<<<
=======
each(serie.data, function (point) {
var pointX = point.x,
pointY = point.y,
isNegative = pointY < 0,
pointStack = isNegative ? negPointStack : posPointStack,
key = isNegative ? negKey : stackKey,
totalPos,
pointLow;
// initial values
if (dataMin === null) {
// start out with the first point
dataMin = dataMax = point[xOrY];
}
>>>>>>>
<<<<<<<
series = items[0].series,
headerFormat = series.tooltipHeaderFormat || '%A, %b %e, %Y',
=======
>>>>>>>
series = items[0].series,
headerFormat = series.tooltipHeaderFormat || '%A, %b %e, %Y',
<<<<<<<
each(point, function (item, i) {
=======
each(point, function (item) {
/*var series = item.series,
hoverPoint = series.hoverPoint;
if (hoverPoint) {
hoverPoint.setState();
}
series.hoverPoint = item;*/
>>>>>>>
each(point, function (item) {
<<<<<<<
each(axes, function (axis, i) {
if (axis.options.zoomEnabled !== false) {
var translate = axis.translate,
isXAxis = axis.isXAxis,
isHorizontal = inverted ? !isXAxis : isXAxis,
selectionMin = translate(
isHorizontal ?
selectionLeft :
plotHeight - selectionTop - selectionBox.height,
true,
0,
0,
1
),
selectionMax = translate(
isHorizontal ?
selectionLeft + selectionBox.width :
plotHeight - selectionTop,
true,
0,
0,
1
);
selectionData[isXAxis ? 'xAxis' : 'yAxis'].push({
axis: axis,
min: mathMin(selectionMin, selectionMax), // for reversed axes,
max: mathMax(selectionMin, selectionMax)
});
}
=======
each(axes, function (axis) {
var translate = axis.translate,
isXAxis = axis.isXAxis,
isHorizontal = inverted ? !isXAxis : isXAxis,
selectionMin = translate(
isHorizontal ?
selectionLeft :
plotHeight - selectionTop - selectionBox.height,
true,
0,
0,
1
),
selectionMax = translate(
isHorizontal ?
selectionLeft + selectionBox.width :
plotHeight - selectionTop,
true,
0,
0,
1
);
selectionData[isXAxis ? 'xAxis' : 'yAxis'].push({
axis: axis,
min: mathMin(selectionMin, selectionMax), // for reversed axes,
max: mathMax(selectionMin, selectionMax)
});
>>>>>>>
each(axes, function (axis) {
if (axis.options.zoomEnabled !== false) {
var translate = axis.translate,
isXAxis = axis.isXAxis,
isHorizontal = inverted ? !isXAxis : isXAxis,
selectionMin = translate(
isHorizontal ?
selectionLeft :
plotHeight - selectionTop - selectionBox.height,
true,
0,
0,
1
),
selectionMax = translate(
isHorizontal ?
selectionLeft + selectionBox.width :
plotHeight - selectionTop,
true,
0,
0,
1
);
selectionData[isXAxis ? 'xAxis' : 'yAxis'].push({
axis: axis,
min: mathMin(selectionMin, selectionMax), // for reversed axes,
max: mathMax(selectionMin, selectionMax)
});
} |
<<<<<<<
var styledMode = this.chart.styledMode;
each(this.points, function (point) {
=======
this.points.forEach(function (point) {
>>>>>>>
var styledMode = this.chart.styledMode;
this.points.forEach(function (point) { |
<<<<<<<
import ElementAlignmentPanel from './elementAlignment';
=======
import VideoOptionsPanel from './videoOptions';
>>>>>>>
import ElementAlignmentPanel from './elementAlignment';
import VideoOptionsPanel from './videoOptions';
<<<<<<<
case VIDEO_POSTER:
return { type, Panel: VideoPosterPanel };
case ELEMENT_ALIGNMENT:
return { type, Panel: ElementAlignmentPanel };
=======
case VIDEO_OPTIONS:
return { type, Panel: VideoOptionsPanel };
case VIDEO_ACCESSIBILITY:
return { type, Panel: VideoAccessibilityPanel };
case IMAGE_ACCESSIBILITY:
return { type, Panel: ImageAccessibilityPanel };
>>>>>>>
case VIDEO_OPTIONS:
return { type, Panel: VideoOptionsPanel };
case VIDEO_ACCESSIBILITY:
return { type, Panel: VideoAccessibilityPanel };
case IMAGE_ACCESSIBILITY:
return { type, Panel: ImageAccessibilityPanel };
case ELEMENT_ALIGNMENT:
return { type, Panel: ElementAlignmentPanel }; |
<<<<<<<
* @license Highmaps JS v2.0-dev (2016-03-16)
=======
* @license Highmaps JS v4.2.3-modified (2016-03-07)
>>>>>>>
* @license Highmaps JS v5.0-dev (2016-03-16)
<<<<<<<
=======
}(function (Highcharts) {
var UNDEFINED,
animObject = Highcharts.animObject,
Axis = Highcharts.Axis,
Chart = Highcharts.Chart,
Color = Highcharts.Color,
Point = Highcharts.Point,
Pointer = Highcharts.Pointer,
Legend = Highcharts.Legend,
LegendSymbolMixin = Highcharts.LegendSymbolMixin,
Renderer = Highcharts.Renderer,
Series = Highcharts.Series,
SVGRenderer = Highcharts.SVGRenderer,
VMLRenderer = Highcharts.VMLRenderer,
win = Highcharts.win,
doc = win.document,
addEvent = Highcharts.addEvent,
each = Highcharts.each,
error = Highcharts.error,
extend = Highcharts.extend,
extendClass = Highcharts.extendClass,
format = Highcharts.format,
merge = Highcharts.merge,
pick = Highcharts.pick,
defaultOptions = Highcharts.getOptions(),
seriesTypes = Highcharts.seriesTypes,
defaultPlotOptions = defaultOptions.plotOptions,
wrap = Highcharts.wrap,
noop = function () {};
/**
* Override to use the extreme coordinates from the SVG shape, not the
* data values
*/
wrap(Axis.prototype, 'getSeriesExtremes', function (proceed) {
var isXAxis = this.isXAxis,
dataMin,
dataMax,
xData = [],
useMapGeometry;
// Remove the xData array and cache it locally so that the proceed method doesn't use it
if (isXAxis) {
each(this.series, function (series, i) {
if (series.useMapGeometry) {
xData[i] = series.xData;
series.xData = [];
}
});
}
>>>>>>>
<<<<<<<
return point;
},
=======
return point;
},
/**
* Stop the fade-out
*/
onMouseOver: function (e) {
clearTimeout(this.colorInterval);
if (this.value !== null) {
Point.prototype.onMouseOver.call(this, e);
} else { //#3401 Tooltip doesn't hide when hovering over null points
this.series.onMouseOut(e);
}
},
/**
* Custom animation for tweening out the colors. Animation reduces blinking when hovering
* over islands and coast lines. We run a custom implementation of animation becuase we
* need to be able to run this independently from other animations like zoom redraw. Also,
* adding color animation to the adapters would introduce almost the same amount of code.
*/
onMouseOut: function () {
var point = this,
start = +new Date(),
normalColor = Color(point.color),
hoverColor = Color(point.pointAttr.hover.fill),
animation = point.series.options.states.normal.animation,
duration = animObject(animation).duration,
fill;
if (duration && normalColor.rgba.length === 4 && hoverColor.rgba.length === 4 && point.state !== 'select') {
fill = point.pointAttr[''].fill;
delete point.pointAttr[''].fill; // avoid resetting it in Point.setState
clearTimeout(point.colorInterval);
point.colorInterval = setInterval(function () {
var pos = (new Date() - start) / duration,
graphic = point.graphic;
if (pos > 1) {
pos = 1;
}
if (graphic) {
graphic.attr('fill', ColorAxis.prototype.tweenColors.call(0, hoverColor, normalColor, pos));
}
if (pos >= 1) {
clearTimeout(point.colorInterval);
}
}, 13);
}
Point.prototype.onMouseOut.call(point);
if (fill) {
point.pointAttr[''].fill = fill;
}
},
>>>>>>>
return point;
},
<<<<<<<
/**
* Extend setData to join in mapData. If the allAreas option is true, all areas
* from the mapData are used, and those that don't correspond to a data value
* are given null values.
*/
setData: function (data, redraw) {
var options = this.options,
globalMapData = this.chart.options.chart && this.chart.options.chart.map,
mapData = options.mapData,
joinBy = options.joinBy,
joinByNull = joinBy === null,
dataUsed = [],
mapPoint,
transform,
mapTransforms,
props,
i;
=======
/**
* Extend setData to join in mapData. If the allAreas option is true, all areas
* from the mapData are used, and those that don't correspond to a data value
* are given null values.
*/
setData: function (data, redraw) {
var options = this.options,
mapData = options.mapData,
joinBy = options.joinBy,
joinByNull = joinBy === null,
dataUsed = [],
mapMap = {},
mapPoint,
transform,
mapTransforms,
props,
i;
if (joinByNull) {
joinBy = '_i';
}
joinBy = this.joinBy = Highcharts.splat(joinBy);
if (!joinBy[1]) {
joinBy[1] = joinBy[0];
}
>>>>>>>
/**
* Extend setData to join in mapData. If the allAreas option is true, all areas
* from the mapData are used, and those that don't correspond to a data value
* are given null values.
*/
setData: function (data, redraw) {
var options = this.options,
globalMapData = this.chart.options.chart && this.chart.options.chart.map,
mapData = options.mapData,
joinBy = options.joinBy,
joinByNull = joinBy === null,
dataUsed = [],
mapMap = {},
mapPoint,
transform,
mapTransforms,
props,
i;
<<<<<<<
this.getBox(mapData);
this.mapData = mapData;
this.mapMap = {};
=======
this.mapData = mapData;
>>>>>>>
this.mapData = mapData; |
<<<<<<<
QUnit.test("Zooming too tight on left category should show full category (#4536)", function (assert) {
var chart = $('#container').highcharts({
chart: {
type: 'column'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
minRange: 0.99
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}, {
data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2]
}, {
data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2]
}]
}).highcharts();
assert.strictEqual(
chart.xAxis[0].min,
0,
"Starting min"
);
assert.strictEqual(
chart.xAxis[0].max,
11,
"Starting max"
);
chart.xAxis[0].setExtremes(0, 0.5);
assert.strictEqual(
chart.xAxis[0].min,
0,
"Ending min"
);
assert.strictEqual(
chart.xAxis[0].max,
0.99,
"Ending max"
);
assert.strictEqual(
typeof chart.xAxis[0].minPixelPadding,
'number',
"Category padding is a number"
);
assert.strictEqual(
chart.xAxis[0].minPixelPadding > 0,
true,
"Category padding is more than 0"
);
});
=======
QUnit.test('Log axis extremes, issue #934', function (assert) {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
height: 400
},
yAxis: {
min: 1000,
max: 1000000000,
type: 'logarithmic',
tickInterval: 1
},
series: [{
data: [
10000,
8900]
}, {
data: [
8600,
7700]
}]
});
var ext = chart.yAxis[0].getExtremes();
assert.strictEqual(
ext.min,
1000,
'Min is 1000'
);
assert.strictEqual(
ext.max,
1000000000,
'Max is 1000000000'
);
});
QUnit.test('Log axis extremes, issue #4360', function (assert) {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column'
},
xAxis: {
type: 'category'
},
yAxis: {
title: {
text: 'Title'
},
type: 'logarithmic'
},
series: [{
name: "Brands",
colorByPoint: true,
data: [{
name: "A",
y: 30
},
{
name: "B",
y: 0
}]
}]
});
assert.strictEqual(
chart.yAxis[0].ticks[chart.yAxis[0].tickPositions[0]].label.textStr,
'30',
'Label is 30'
);
});
QUnit.test("setExtremes shouldn't return undefined min or max after zooming.(#1655)", function (assert) {
var min,
max,
UNDEFINED,
chart = new Highcharts.StockChart({
chart: {
renderTo: 'container',
zoomType: 'x'
},
series: [{
data: [
[Date.UTC(2011, 1), 1],
[Date.UTC(2012, 1), 1]
]
}],
xAxis: {
events: {
setExtremes: function (event) {
min = event.min;
max = event.max;
}
}
}
});
// Set testing extremes:
chart.xAxis[0].setExtremes(Date.UTC(2010, 1), Date.UTC(2013, 1), true, false);
// Imitate left side zooming:
chart.pointer.selectionMarker = chart.renderer.rect(chart.plotLeft + 50, chart.plotTop, 200, chart.plotHeight).add();
chart.pointer.hasDragged = true;
chart.pointer.drop({});
// Test:
assert.strictEqual(
min !== UNDEFINED,
true,
'Proper minimum'
);
// Reset extremes for a second test:
chart.xAxis[0].setExtremes(Date.UTC(2010, 1), Date.UTC(2013, 1), true, false);
// Imitate right side zooming:
chart.pointer.selectionMarker = chart.renderer.rect(chart.plotLeft + 200, chart.plotTop, 200, chart.plotHeight).add();
chart.pointer.hasDragged = true;
chart.pointer.drop({});
// Test:
assert.strictEqual(
max !== UNDEFINED,
true,
'Proper maximum'
);
});
>>>>>>>
QUnit.test("Zooming too tight on left category should show full category (#4536)", function (assert) {
var chart = $('#container').highcharts({
chart: {
type: 'column'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
minRange: 0.99
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}, {
data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2]
}, {
data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2]
}]
}).highcharts();
assert.strictEqual(
chart.xAxis[0].min,
0,
"Starting min"
);
assert.strictEqual(
chart.xAxis[0].max,
11,
"Starting max"
);
chart.xAxis[0].setExtremes(0, 0.5);
assert.strictEqual(
chart.xAxis[0].min,
0,
"Ending min"
);
assert.strictEqual(
chart.xAxis[0].max,
0.99,
"Ending max"
);
assert.strictEqual(
typeof chart.xAxis[0].minPixelPadding,
'number',
"Category padding is a number"
);
assert.strictEqual(
chart.xAxis[0].minPixelPadding > 0,
true,
"Category padding is more than 0"
);
});
QUnit.test('Log axis extremes, issue #934', function (assert) {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
height: 400
},
yAxis: {
min: 1000,
max: 1000000000,
type: 'logarithmic',
tickInterval: 1
},
series: [{
data: [
10000,
8900]
}, {
data: [
8600,
7700]
}]
});
var ext = chart.yAxis[0].getExtremes();
assert.strictEqual(
ext.min,
1000,
'Min is 1000'
);
assert.strictEqual(
ext.max,
1000000000,
'Max is 1000000000'
);
});
QUnit.test('Log axis extremes, issue #4360', function (assert) {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'column'
},
xAxis: {
type: 'category'
},
yAxis: {
title: {
text: 'Title'
},
type: 'logarithmic'
},
series: [{
name: "Brands",
colorByPoint: true,
data: [{
name: "A",
y: 30
},
{
name: "B",
y: 0
}]
}]
});
assert.strictEqual(
chart.yAxis[0].ticks[chart.yAxis[0].tickPositions[0]].label.textStr,
'30',
'Label is 30'
);
});
QUnit.test("setExtremes shouldn't return undefined min or max after zooming.(#1655)", function (assert) {
var min,
max,
UNDEFINED,
chart = new Highcharts.StockChart({
chart: {
renderTo: 'container',
zoomType: 'x'
},
series: [{
data: [
[Date.UTC(2011, 1), 1],
[Date.UTC(2012, 1), 1]
]
}],
xAxis: {
events: {
setExtremes: function (event) {
min = event.min;
max = event.max;
}
}
}
});
// Set testing extremes:
chart.xAxis[0].setExtremes(Date.UTC(2010, 1), Date.UTC(2013, 1), true, false);
// Imitate left side zooming:
chart.pointer.selectionMarker = chart.renderer.rect(chart.plotLeft + 50, chart.plotTop, 200, chart.plotHeight).add();
chart.pointer.hasDragged = true;
chart.pointer.drop({});
// Test:
assert.strictEqual(
min !== UNDEFINED,
true,
'Proper minimum'
);
// Reset extremes for a second test:
chart.xAxis[0].setExtremes(Date.UTC(2010, 1), Date.UTC(2013, 1), true, false);
// Imitate right side zooming:
chart.pointer.selectionMarker = chart.renderer.rect(chart.plotLeft + 200, chart.plotTop, 200, chart.plotHeight).add();
chart.pointer.hasDragged = true;
chart.pointer.drop({});
// Test:
assert.strictEqual(
max !== UNDEFINED,
true,
'Proper maximum'
);
}); |
<<<<<<<
/**
* Adds the title defined in axis.options.title.
* @param {Boolean} display - whether or not to display the title
*/
addTitle: function (display) {
var axis = this,
renderer = axis.chart.renderer,
horiz = axis.horiz,
opposite = axis.opposite,
options = axis.options,
axisTitleOptions = options.title,
textAlign;
if (!axis.axisTitle) {
textAlign = axisTitleOptions.textAlign;
if (!textAlign) {
textAlign = (horiz ? {
low: 'left',
middle: 'center',
high: 'right'
} : {
low: opposite ? 'right' : 'left',
middle: 'center',
high: opposite ? 'left' : 'right'
})[axisTitleOptions.align];
}
axis.axisTitle = renderer.text(
axisTitleOptions.text,
0,
0,
axisTitleOptions.useHTML
)
.attr({
zIndex: 7,
rotation: axisTitleOptions.rotation || 0,
align: textAlign
})
.addClass('highcharts-axis-title')
/*= if (build.classic) { =*/
.css(axisTitleOptions.style)
/*= } =*/
.add(axis.axisGroup);
axis.axisTitle.isNew = true;
}
// hide or show the title depending on whether showEmpty is set
axis.axisTitle[display ? 'show' : 'hide'](true);
},
/**
* Generates a tick for initial positioning
* @param {Number} pos - the tick position value (not px)
* @param {Integer} i - the index of the tick in axis.tickPositions
*/
generateTick: function (pos) {
var axis = this,
ticks = axis.ticks;
if (!ticks[pos]) {
ticks[pos] = new Tick(axis, pos);
} else {
ticks[pos].addLabel(); // update labels depending on tick interval
}
},
=======
/**
* Adds the title defined in axis.options.title.
* @param {Boolean} display - whether or not to display the title
*/
addTitle: function (display) {
var axis = this,
renderer = axis.chart.renderer,
horiz = axis.horiz,
opposite = axis.opposite,
options = axis.options,
axisTitleOptions = options.title,
textAlign;
if (!axis.axisTitle) {
textAlign = axisTitleOptions.textAlign;
if (!textAlign) {
textAlign = (horiz ? {
low: 'left',
middle: 'center',
high: 'right'
} : {
low: opposite ? 'right' : 'left',
middle: 'center',
high: opposite ? 'left' : 'right'
})[axisTitleOptions.align];
}
axis.axisTitle = renderer.text(
axisTitleOptions.text,
0,
0,
axisTitleOptions.useHTML
)
.attr({
zIndex: 7,
rotation: axisTitleOptions.rotation || 0,
align: textAlign
})
.addClass('highcharts-axis-title')
/*= if (build.classic) { =*/
.css(axisTitleOptions.style)
/*= } =*/
.add(axis.axisGroup);
axis.axisTitle.isNew = true;
}
// hide or show the title depending on whether showEmpty is set
axis.axisTitle[display ? 'show' : 'hide'](true);
},
/**
* Generates a tick for initial positioning.
* @param {number} pos - The tick position in axis values.
* @param {number} i - The index of the tick in axis.tickPositions.
*/
generateTick: function (pos) {
var ticks = this.ticks;
if (!ticks[pos]) {
ticks[pos] = new Tick(this, pos);
} else {
ticks[pos].addLabel(); // update labels depending on tick interval
}
},
>>>>>>>
/**
* Adds the title defined in axis.options.title.
* @param {Boolean} display - whether or not to display the title
*/
addTitle: function (display) {
var axis = this,
renderer = axis.chart.renderer,
horiz = axis.horiz,
opposite = axis.opposite,
options = axis.options,
axisTitleOptions = options.title,
textAlign;
if (!axis.axisTitle) {
textAlign = axisTitleOptions.textAlign;
if (!textAlign) {
textAlign = (horiz ? {
low: 'left',
middle: 'center',
high: 'right'
} : {
low: opposite ? 'right' : 'left',
middle: 'center',
high: opposite ? 'left' : 'right'
})[axisTitleOptions.align];
}
axis.axisTitle = renderer.text(
axisTitleOptions.text,
0,
0,
axisTitleOptions.useHTML
)
.attr({
zIndex: 7,
rotation: axisTitleOptions.rotation || 0,
align: textAlign
})
.addClass('highcharts-axis-title')
/*= if (build.classic) { =*/
.css(axisTitleOptions.style)
/*= } =*/
.add(axis.axisGroup);
axis.axisTitle.isNew = true;
}
// hide or show the title depending on whether showEmpty is set
axis.axisTitle[display ? 'show' : 'hide'](true);
},
/**
* Generates a tick for initial positioning.
* @param {number} pos - The tick position in axis values.
* @param {number} i - The index of the tick in axis.tickPositions.
*/
generateTick: function (pos) {
var ticks = this.ticks;
if (!ticks[pos]) {
ticks[pos] = new Tick(this, pos);
} else {
ticks[pos].addLabel(); // update labels depending on tick interval
}
},
/** |
<<<<<<<
// do we really need to go through all this?
if (axis.len !== axis.oldAxisLength || isDirtyData || axis.isLinked ||
axis.userMin !== axis.oldUserMin || axis.userMax !== axis.oldUserMax) {
=======
// do we really need to go through all this?
if (isDirtyAxisLength || isDirtyData || isLinked ||
userMin !== oldUserMin || userMax !== oldUserMax) {
>>>>>>>
// do we really need to go through all this?
if (isDirtyAxisLength || isDirtyData || axis.isLinked ||
axis.userMin !== axis.oldUserMin || axis.userMax !== axis.oldUserMax) {
<<<<<<<
// Mark as dirty if it is not already set to dirty and extremes have changed. #595.
if (!axis.isDirty) {
axis.isDirty = chart.isDirtyBox || axis.min !== axis.oldMin || axis.max !== axis.oldMax;
=======
// Mark as dirty if it is not already set to dirty and extremes have changed. #595.
if (!axis.isDirty) {
axis.isDirty = isDirtyAxisLength || min !== oldMin || max !== oldMax;
}
>>>>>>>
// Mark as dirty if it is not already set to dirty and extremes have changed. #595.
if (!axis.isDirty) {
axis.isDirty = isDirtyAxisLength || axis.min !== axis.oldMin || axis.max !== axis.oldMax;
<<<<<<<
};
=======
}
function updatedDataHandler() {
var baseXAxis = baseSeries.xAxis,
baseExtremes = baseXAxis.getExtremes(),
baseMin = baseExtremes.min,
baseMax = baseExtremes.max,
baseDataMin = baseExtremes.dataMin,
baseDataMax = baseExtremes.dataMax,
range = baseMax - baseMin,
stickToMin,
stickToMax,
newMax,
newMin,
doRedraw,
navXData = navigatorSeries.xData,
hasSetExtremes = !!baseXAxis.setExtremes;
// detect whether to move the range
stickToMax = baseMax >= navXData[navXData.length - 1];
stickToMin = baseMin <= navXData[0];
// set the navigator series data to the new data of the base series
if (!navigatorData) {
navigatorSeries.options.pointStart = baseSeries.xData[0];
navigatorSeries.setData(baseSeries.options.data, false);
doRedraw = true;
}
// if the zoomed range is already at the min, move it to the right as new data
// comes in
if (stickToMin) {
newMin = baseDataMin;
newMax = newMin + range;
}
// if the zoomed range is already at the max, move it to the right as new data
// comes in
if (stickToMax) {
newMax = baseDataMax;
if (!stickToMin) { // if stickToMin is true, the new min value is set above
newMin = mathMax(newMax - range, navigatorSeries.xData[0]);
}
}
>>>>>>>
};
<<<<<<<
=======
// Run scroller
init();
// Expose
return {
render: render,
destroy: destroy,
series: navigatorSeries,
xAxis: xAxis,
yAxis: yAxis
};
>>>>>>> |
<<<<<<<
minMonth = minDate[Date.hcGetMonth](),
minDateDate = minDate[Date.hcGetDate](),
localTimezoneOffset = (timeUnits.day +
=======
minMonth = minDate[getMonth](),
minDateDate = minDate[getDate](),
variableDayLength = !useUTC || !!getTimezoneOffset, // #4951
localTimezoneOffset = (timeUnits.day +
>>>>>>>
minMonth = minDate[Date.hcGetMonth](),
minDateDate = minDate[Date.hcGetDate](),
variableDayLength = !useUTC || !!getTimezoneOffset, // #4951
localTimezoneOffset = (timeUnits.day + |
<<<<<<<
<InnerContainer>
{innerElement}
{attribution}
{local && (
<CSSTransition
in
appear={true}
timeout={0}
className="uploading-indicator"
>
<UploadingIndicator />
</CSSTransition>
)}
{hasDropdownMenu && providerType === ProviderType.LOCAL && (
<DropDownMenu
resource={resource}
display={active}
isMenuOpen={isMenuOpen}
onMenuOpen={onMenuOpen}
onMenuCancelled={onMenuCancelled}
onMenuSelected={onMenuSelected}
/>
)}
</InnerContainer>
=======
{innerElement}
{attribution}
{local && (
<CSSTransition
in
appear={true}
timeout={0}
className="uploading-indicator"
>
<UploadingIndicator />
</CSSTransition>
)}
{hasDropdownMenu && providerType === 'local' && (
<DropDownMenu
resource={resource}
display={active}
isMenuOpen={isMenuOpen}
onMenuOpen={onMenuOpen}
onMenuCancelled={onMenuCancelled}
onMenuSelected={onMenuSelected}
/>
)}
>>>>>>>
<InnerContainer>
{innerElement}
{attribution}
{local && (
<CSSTransition
in
appear={true}
timeout={0}
className="uploading-indicator"
>
<UploadingIndicator />
</CSSTransition>
)}
{hasDropdownMenu && providerType === 'local' && (
<DropDownMenu
resource={resource}
display={active}
isMenuOpen={isMenuOpen}
onMenuOpen={onMenuOpen}
onMenuCancelled={onMenuCancelled}
onMenuSelected={onMenuSelected}
/>
)}
</InnerContainer> |
<<<<<<<
=======
/**
* Enable or disable the scrollbar.
*
* @type {Boolean}
* @sample {highstock} stock/scrollbar/enabled/ Disable the scrollbar, only use navigator
* @default true
* @product highstock
* @apioption scrollbar.enabled
*/
/**
* Whether to show or hide the scrollbar when the scrolled content is
* zoomed out to it full extent.
*
* @type {Boolean}
* @default true
* @product highstock
* @apioption scrollbar.showFull
*/
/**
* The corner radius of the border of the scrollbar track.
*
* @type {Number}
* @sample {highstock} stock/scrollbar/style/ Scrollbar styling
* @default 0
* @product highstock
* @apioption scrollbar.trackBorderRadius
*/
>>>>>>>
/**
* Enable or disable the scrollbar.
*
* @type {Boolean}
* @sample {highstock} stock/scrollbar/enabled/ Disable the scrollbar, only use navigator
* @default true
* @product highstock
* @apioption scrollbar.enabled
*/
/**
* Whether to show or hide the scrollbar when the scrolled content is
* zoomed out to it full extent.
*
* @type {Boolean}
* @default true
* @product highstock
* @apioption scrollbar.showFull
*/
/**
* The corner radius of the border of the scrollbar track.
*
* @type {Number}
* @sample {highstock} stock/scrollbar/style/ Scrollbar styling
* @default 0
* @product highstock
* @apioption scrollbar.trackBorderRadius
*/ |
<<<<<<<
/*= } =*/
chart.redraw();
=======
chart.redraw(animation); // Animation is set anyway on redraw, #5665
>>>>>>>
/*= } =*/
chart.redraw(animation); // Animation is set anyway on redraw, #5665 |
<<<<<<<
'parts': 'parts' + DS + '+\.js$',
'parts-more': 'parts-more' + DS + '+\.js$',
'parts-gantt': 'parts-gantt' + DS + '+\.js$'
=======
'parts': 'parts' + SINGLEDS + '+\.js$',
'parts-more': 'parts-more' + SINGLEDS + '+\.js$',
'highchartsFiles': [
'parts' + DS + 'Globals\.js$',
'parts' + DS + 'SvgRenderer\.js$',
'parts' + DS + 'Html\.js$',
'parts' + DS + 'VmlRenderer\.js$',
'parts' + DS + 'Axis\.js$',
'parts' + DS + 'DateTimeAxis\.js$',
'parts' + DS + 'LogarithmicAxis\.js$',
'parts' + DS + 'Tooltip\.js$',
'parts' + DS + 'Pointer\.js$',
'parts' + DS + 'TouchPointer\.js$',
'parts' + DS + 'MSPointer\.js$',
'parts' + DS + 'Legend\.js$',
'parts' + DS + 'Chart\.js$',
'parts' + DS + 'Stacking\.js$',
'parts' + DS + 'Dynamics\.js$',
'parts' + DS + 'AreaSeries\.js$',
'parts' + DS + 'SplineSeries\.js$',
'parts' + DS + 'AreaSplineSeries\.js$',
'parts' + DS + 'ColumnSeries\.js$',
'parts' + DS + 'BarSeries\.js$',
'parts' + DS + 'ScatterSeries\.js$',
'parts' + DS + 'PieSeries\.js$',
'parts' + DS + 'DataLabels\.js$',
'modules' + DS + 'overlapping-datalabels.src\.js$',
'parts' + DS + 'Interaction\.js$',
'parts' + DS + 'Responsive\.js$',
'parts' + DS + 'Color\.js$',
'parts' + DS + 'Options\.js$',
'parts' + DS + 'PlotLineOrBand\.js$',
'parts' + DS + 'Tick\.js$',
'parts' + DS + 'Point\.js$',
'parts' + DS + 'Series\.js$',
'parts' + DS + 'Utilities\.js$'
]
>>>>>>>
'parts': 'parts' + SINGLEDS + '+\.js$',
'parts-more': 'parts-more' + SINGLEDS + '+\.js$',
'parts-gantt': 'parts-gantt' + SINGLEDS + '+\.js$',
'highchartsFiles': [
'parts' + DS + 'Globals\.js$',
'parts' + DS + 'SvgRenderer\.js$',
'parts' + DS + 'Html\.js$',
'parts' + DS + 'VmlRenderer\.js$',
'parts' + DS + 'Axis\.js$',
'parts' + DS + 'DateTimeAxis\.js$',
'parts' + DS + 'LogarithmicAxis\.js$',
'parts' + DS + 'Tooltip\.js$',
'parts' + DS + 'Pointer\.js$',
'parts' + DS + 'TouchPointer\.js$',
'parts' + DS + 'MSPointer\.js$',
'parts' + DS + 'Legend\.js$',
'parts' + DS + 'Chart\.js$',
'parts' + DS + 'Stacking\.js$',
'parts' + DS + 'Dynamics\.js$',
'parts' + DS + 'AreaSeries\.js$',
'parts' + DS + 'SplineSeries\.js$',
'parts' + DS + 'AreaSplineSeries\.js$',
'parts' + DS + 'ColumnSeries\.js$',
'parts' + DS + 'BarSeries\.js$',
'parts' + DS + 'ScatterSeries\.js$',
'parts' + DS + 'PieSeries\.js$',
'parts' + DS + 'DataLabels\.js$',
'modules' + DS + 'overlapping-datalabels.src\.js$',
'parts' + DS + 'Interaction\.js$',
'parts' + DS + 'Responsive\.js$',
'parts' + DS + 'Color\.js$',
'parts' + DS + 'Options\.js$',
'parts' + DS + 'PlotLineOrBand\.js$',
'parts' + DS + 'Tick\.js$',
'parts' + DS + 'Point\.js$',
'parts' + DS + 'Series\.js$',
'parts' + DS + 'Utilities\.js$'
] |
<<<<<<<
return elem.attr ? // is SVG element wrapper
elem.attr(fx.prop, fn === 'cur' ? undefined : fx.now) : // apply the SVG wrapper's method
base.apply(this, arguments); // use jQuery's built-in method
=======
if (elem.attr) { // is SVG element wrapper
return elem.attr(
fx.prop.replace('strokeWidth', 'stroke-width'), // #4721
fn === 'cur' ? undefined : fx.now
);
}
return base.apply(this, arguments); // use jQuery's built-in method
>>>>>>>
if (elem.attr) { // is SVG element wrapper
return elem.attr(
fx.prop.replace('strokeWidth', 'stroke-width'), // #4721
fn === 'cur' ? undefined : fx.now
);
}
return base.apply(this, arguments); // use jQuery's built-in method
<<<<<<<
function (arr, fn, ctx) { // modern browsers
return Array.prototype.forEach.call(arr, fn, ctx);
} :
function (arr, fn, ctx) { // legacy
var i,
=======
function each(arr, fn) { // modern browsers
return Array.prototype.forEach.call(arr, fn);
} :
function each(arr, fn) { // legacy
var i,
>>>>>>>
function each(arr, fn, ctx) { // modern browsers
return Array.prototype.forEach.call(arr, fn, ctx);
} :
function each(arr, fn, ctx) { // legacy
var i, |
<<<<<<<
import '../../Stock/Indicators/PSARIndicator.js';
import '../../Stock/Indicators/ROC/ROCIndicator.js';
import '../../Stock/Indicators/RSIIndicator.js';
=======
import '../../Stock/Indicators/PSAR/PSARIndicator.js';
import '../../Stock/Indicators/ROCIndicator.js';
import '../../Stock/Indicators/RSI/RSIIndicator.js';
>>>>>>>
import '../../Stock/Indicators/PSAR/PSARIndicator.js';
import '../../Stock/Indicators/ROC/ROCIndicator.js';
import '../../Stock/Indicators/RSI/RSIIndicator.js'; |
<<<<<<<
// make room below the chart
chart.extraBottomMargin = scroller.outlineHeight + navigatorOptions.margin;
chart.isDirtyBox = true;
=======
// make room below the chart
chart.extraBottomMargin = scroller.outlineHeight + navigatorOptions.margin;
>>>>>>>
// make room below the chart
chart.extraBottomMargin = scroller.outlineHeight + navigatorOptions.margin;
chart.isDirtyBox = true;
<<<<<<<
=======
>>>>>>> |
<<<<<<<
function Axis(options) {
=======
function Axis(userOptions) {
>>>>>>>
function Axis(userOptions) {
<<<<<<<
series: [], // populated by Series
stacks: stacks
=======
stacks: stacks,
destroy: destroy
>>>>>>>
series: [], // populated by Series
stacks: stacks,
destroy: destroy
<<<<<<<
addEvent(doc, 'mousemove', function (e) {
if (e.event) {
e = e.event; // MooTools renames e.pageX to e.page.x
}
if (chartPosition &&
!isInsidePlot(e.pageX - chartPosition.left - plotLeft,
e.pageY - chartPosition.top - plotTop)) {
resetTracker();
}
});
=======
addEvent(doc, 'mousemove', hideTooltipOnMouseMove);
>>>>>>>
addEvent(doc, 'mousemove', hideTooltipOnMouseMove);
<<<<<<<
resetTracker: resetTracker,
normalizeMouseEvent: normalizeMouseEvent
=======
resetTracker: resetTracker,
destroy: destroy
>>>>>>>
resetTracker: resetTracker,
normalizeMouseEvent: normalizeMouseEvent,
destroy: destroy
<<<<<<<
rightPadding = 20,
=======
>>>>>>>
<<<<<<<
optionsArray = xAxisOptions.concat(yAxisOptions);
=======
axes = xAxisOptions.concat(yAxisOptions);
// loop the options and construct axis objects
chart.xAxis = [];
chart.yAxis = [];
axes = map(axes, function (axisOptions) {
axis = new Axis(axisOptions);
chart[axis.isXAxis ? 'xAxis' : 'yAxis'].push(axis);
>>>>>>>
optionsArray = xAxisOptions.concat(yAxisOptions);
<<<<<<<
=======
chart = null;
>>>>>>>
chart = null; |
<<<<<<<
app: { hook: 'posts.patrol' },
auth: { strategy: 'jwt' },
=======
auth: { mode: 'try', strategy: 'jwt' },
>>>>>>>
app: { hook: 'posts.patrol' },
auth: { mode: 'try', strategy: 'jwt' }, |
<<<<<<<
// Set the new position, and show or hide
if (show) {
label[tick.isNew ? 'attr' : 'animate']({
x: label.x,
y: label.y
});
label.show();
tick.isNew = false;
} else {
label.hide();
}
=======
label[tick.isNew ? 'attr' : 'animate'](xy);
>>>>>>>
// Set the new position, and show or hide
if (show) {
label[tick.isNew ? 'attr' : 'animate'](xy);
label.show();
tick.isNew = false;
} else {
label.hide();
} |
<<<<<<<
import '../../Stock/Indicators/KeltnerChannelsIndicator.js';
import '../../Stock/Indicators/MACD/MACDIndicator.js';
import '../../Stock/Indicators/MFIIndicator.js';
=======
import '../../Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js';
import '../../Stock/Indicators/MACDIndicator.js';
import '../../Stock/Indicators/MFI/MFIIndicator.js';
>>>>>>>
import '../../Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js';
import '../../Stock/Indicators/MACD/MACDIndicator.js';
import '../../Stock/Indicators/MFI/MFIIndicator.js'; |
<<<<<<<
input.value = time.dateFormat(this.inputTypeFormats[input.type] || options.inputEditDateFormat || '%Y-%m-%d', updatedTime);
=======
input.value = time.dateFormat(options.inputEditDateFormat, updatedTime);
>>>>>>>
input.value = time.dateFormat(this.inputTypeFormats[input.type] || options.inputEditDateFormat, updatedTime);
<<<<<<<
// Set or reset the input values
rangeSelector.setInputValue('min', min);
rangeSelector.setInputValue('max', max);
var unionExtremes = (chart.scroller && chart.scroller.getUnionExtremes()) || chart.xAxis[0] || {};
if (defined(unionExtremes.dataMin) && defined(unionExtremes.dataMax)) {
var minRange = chart.xAxis[0].minRange || 0;
rangeSelector.setInputExtremes('min', unionExtremes.dataMin, Math.min(unionExtremes.dataMax, rangeSelector.getInputValue('max')) - minRange);
rangeSelector.setInputExtremes('max', Math.max(unionExtremes.dataMin, rangeSelector.getInputValue('min')) + minRange, unionExtremes.dataMax);
}
// skip animation
rangeSelector.inputGroup.placed = animate;
}
// vertical align
rangeSelector.group.align({
verticalAlign: verticalAlign
}, true, chart.spacingBox);
// set position
groupHeight =
rangeSelector.group.getBBox().height + 20; // # 20 padding
alignTranslateY =
rangeSelector.group.alignAttr.translateY;
// calculate bottom position
if (verticalAlign === 'bottom') {
legendHeight = (legendOptions &&
legendOptions.verticalAlign === 'bottom' &&
legendOptions.enabled &&
!legendOptions.floating ?
legend.legendHeight + pick(legendOptions.margin, 10) :
0);
groupHeight = groupHeight + legendHeight - 20;
translateY = (alignTranslateY -
groupHeight -
(floating ? 0 : options.y) -
(chart.titleOffset ? chart.titleOffset[2] : 0) -
10 // 10 spacing
);
=======
>>>>>>> |
<<<<<<<
/*global Highcharts, HighchartsAdapter */
=======
/* eslint indent: [2, 4] */
(function (Highcharts) {
>>>>>>>
/* eslint indent: [2, 4] */ |
<<<<<<<
*
* @since 6.0.0
* @product highcharts highstock
=======
* @since 6.0.0
* @product highcharts highstock gantt
>>>>>>>
*
* @since 6.0.0
* @product highcharts highstock gantt |
<<<<<<<
* Author object
*
* @typedef {Author} Author
* @property {string} displayName The display name of the author.
* @property {?string} url An optional URL to link to the author's profile or
* website.
*/
/**
* Attribution object
*
* @typedef {Attribution} Attribution
* @property {Author} author The author of the media object.
*/
/**
=======
* Attachment object.
*
* @typedef {Attachment} Attachment
* @property {string} [type] Attachment type, e.g. video or image.
* @property {string} mimeType The MIME type.
* @property {string|null} creationDate When the attachment was created.
* @property {string} src The source URL.
* @property {number} width The natural resource width.
* @property {number} height The natural resource height.
* @property {string|null} poster The poster URL for the "video" type.
* @property {number|null} posterId The system poster ID.
* @property {number|null} id The system ID.
* @property {number|null} length The length for the "video" type.
* @property {string|null} lengthFormatted The formatted length for the "video"
* type.
* @property {string|null} title The user-readable title for the resource.
* @property {string|null} alt The user-readable accessibility label for the
* resource.
* @property {boolean} local Whether the resource has been already uploaded to
* the server.
* @property {Object} sizes Object of image sizes.
*/
/**
>>>>>>>
* Author object
*
* @typedef {Author} Author
* @property {string} displayName The display name of the author.
* @property {?string} url An optional URL to link to the author's profile or
* website.
*/
/**
* Attribution object
*
* @typedef {Attribution} Attribution
* @property {Author} author The author of the media object.
*/
/**
* Attachment object.
*
* @typedef {Attachment} Attachment
* @property {string} [type] Attachment type, e.g. video or image.
* @property {string} mimeType The MIME type.
* @property {string|null} creationDate When the attachment was created.
* @property {string} src The source URL.
* @property {number} width The natural resource width.
* @property {number} height The natural resource height.
* @property {string|null} poster The poster URL for the "video" type.
* @property {number|null} posterId The system poster ID.
* @property {number|null} id The system ID.
* @property {number|null} length The length for the "video" type.
* @property {string|null} lengthFormatted The formatted length for the "video"
* type.
* @property {string|null} title The user-readable title for the resource.
* @property {string|null} alt The user-readable accessibility label for the
* resource.
* @property {boolean} local Whether the resource has been already uploaded to
* the server.
* @property {Object} sizes Object of image sizes.
*/
/**
<<<<<<<
* @typedef {Object} Resource
* @property {string|undefined} type Resource type. Currently only "image" and
=======
* @typedef {Resource} Resource
* @property {string|null} type Resource type. Currently only "image" and
>>>>>>>
* @typedef {Resource} Resource
* @property {string|null} type Resource type. Currently only "image" and
<<<<<<<
* @property {Object} sizes Object of image sizes.
* @property {?Attribution} attribution An optional attribution for the
* resource.
=======
* @property {Object} sizes Object of image sizes.
>>>>>>>
* @property {Object} sizes Object of image sizes.
* @property {?Attribution} attribution An optional attribution for the
* resource.
<<<<<<<
* @param {Object} sourceObject An object to create the resource from.
=======
* @param {Attachment} attachment WordPress Attachment object.
>>>>>>>
* @param {Attachment} attachment WordPress Attachment object. |
<<<<<<<
(function (H) {
var Chart = H.Chart,
each = H.each,
pick = H.pick,
wrap = H.wrap;
/***
=======
/***
>>>>>>>
(function (H) {
var Chart = H.Chart,
each = H.each,
pick = H.pick,
wrap = H.wrap;
/***
<<<<<<<
wrap(Chart.prototype, 'isInsidePlot', function (proceed) {
if (this.is3d()) {
return true;
} else {
return proceed.apply(this, [].slice.call(arguments, 1));
}
=======
Highcharts.wrap(Highcharts.Chart.prototype, 'isInsidePlot', function (proceed) {
return this.is3d() || proceed.apply(this, [].slice.call(arguments, 1));
>>>>>>>
wrap(Chart.prototype, 'isInsidePlot', function (proceed) {
return this.is3d() || proceed.apply(this, [].slice.call(arguments, 1));
<<<<<<<
pieOptions.borderColor = pick(pieOptions.borderColor, undefined);
=======
pieOptions.borderColor = Highcharts.pick(pieOptions.borderColor, undefined);
>>>>>>>
pieOptions.borderColor = pick(pieOptions.borderColor, undefined); |
<<<<<<<
=======
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
/**
>>>>>>>
<<<<<<<
import styled from 'styled-components';
import { useCallback, useRef, useLayoutEffect, useMemo } from 'react';
=======
>>>>>>>
import styled from 'styled-components';
import { useCallback, useLayoutEffect, useMemo, useRef } from 'react'; |
<<<<<<<
H.pad = function (number, length) {
return new Array((length || 2) + 1 - String(number).length).join(0) + number;
};
=======
function pad(number, length, padder) {
return new Array((length || 2) + 1 - String(number).length).join(padder || 0) + number;
}
>>>>>>>
H.pad = function (number, length, padder) {
return new Array((length || 2) + 1 - String(number).length).join(padder || 0) + number;
};
<<<<<<<
return el.scrollWidth - H.getStyle(el, 'padding-left') - H.getStyle(el, 'padding-right');
=======
return Math.min(el.offsetWidth, el.scrollWidth) - getStyle(el, 'padding-left') - getStyle(el, 'padding-right');
>>>>>>>
return Math.min(el.offsetWidth, el.scrollWidth) - H.getStyle(el, 'padding-left') - H.getStyle(el, 'padding-right');
<<<<<<<
return el.scrollHeight - H.getStyle(el, 'padding-top') - H.getStyle(el, 'padding-bottom');
=======
return Math.min(el.offsetHeight, el.scrollHeight) - getStyle(el, 'padding-top') - getStyle(el, 'padding-bottom');
>>>>>>>
return Math.min(el.offsetHeight, el.scrollHeight) - H.getStyle(el, 'padding-top') - H.getStyle(el, 'padding-bottom');
<<<<<<<
return el[alias] - 2 * H.getStyle(el, 'padding');
=======
return Math.max(el[alias] - 2 * getStyle(el, 'padding'), 0);
>>>>>>>
return Math.max(el[alias] - 2 * getStyle(el, 'padding'), 0);
<<<<<<<
return H;
}(Highcharts));
=======
// Expose utilities
Highcharts.Fx = Fx;
Highcharts.inArray = inArray;
Highcharts.each = each;
Highcharts.grep = grep;
Highcharts.offset = offset;
Highcharts.map = map;
Highcharts.addEvent = addEvent;
Highcharts.removeEvent = removeEvent;
Highcharts.fireEvent = fireEvent;
Highcharts.animate = animate;
Highcharts.animObject = animObject;
Highcharts.stop = stop;
>>>>>>>
return H;
}(Highcharts)); |
<<<<<<<
QUnit.test('Labels should be wrapped(#4415)', function (assert) {
var chart = $("#container").highcharts({
chart: {
type: 'column',
marginTop: 80,
marginRight: 40
},
title: {
text: 'Total fruit consumption, grouped by gender'
},
xAxis: {
categories: ['Large Apples', 'Long Oranges', 'Posh Pears', 'Ransid Grapes', 'Clever Bananas', 'Bording Tomatos', 'Jolly Cabbage', 'Small Plumps', 'Wierd Apricots'],
labels: {
step: 1
}
},
yAxis: {
allowDecimals: false,
min: 0,
title: {
text: 'Number of fruits'
}
},
tooltip: {
headerFormat: '<b>{point.key}</b><br>',
pointFormat: '<span style="color:{series.color}">\u25CF</span> {series.name}: {point.y} / {point.stackTotal}'
},
plotOptions: {
bar: {
depth: 40
}
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2, 2, 7, 8, 4]
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5, 4, 3, 5, 3]
}, {
name: 'Jane',
data: [2, 5, 6, 2, 1, 4, 5, 3, 6]
}, {
name: 'Janet',
data: [3, 0, 4, 4, 3, 2, 3, 1, 3]
}]
}).highcharts();
var xAxis = chart.xAxis[0],
box0 = xAxis.ticks[xAxis.tickPositions[0]].label.getBBox(true),
box1 = xAxis.ticks[xAxis.tickPositions[1]].label.getBBox(true);
assert.equal(
box0.x + box0.width <= box1.x,
true,
'No overlap'
);
});
=======
QUnit.test("X axis label rotation ignored step(#3971)", function (assert) {
var chart = $('#container').highcharts({
xAxis: {
categories: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
labels: {
step: 1,
rotation: 1, // try to set to '0'
staggerLines: 1
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
}).highcharts();
assert.strictEqual(
chart.xAxis[0].tickPositions.length,
60,
'No ticks are skipped'
);
});
QUnit.test("Auto label alignment is still working when step is set", function (assert) {
var chart = $('#container').highcharts({
chart: {
marginBottom: 80
},
xAxis: {
categories: ['Loooooong', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
labels: {
step: 1,
rotation: -90
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
}).highcharts();
assert.strictEqual(
chart.xAxis[0].labelAlign,
'right',
'Rigth aligned'
);
});
>>>>>>>
QUnit.test('Labels should be wrapped(#4415)', function (assert) {
var chart = $("#container").highcharts({
chart: {
type: 'column',
marginTop: 80,
marginRight: 40
},
title: {
text: 'Total fruit consumption, grouped by gender'
},
xAxis: {
categories: ['Large Apples', 'Long Oranges', 'Posh Pears', 'Ransid Grapes', 'Clever Bananas', 'Bording Tomatos', 'Jolly Cabbage', 'Small Plumps', 'Wierd Apricots'],
labels: {
step: 1
}
},
yAxis: {
allowDecimals: false,
min: 0,
title: {
text: 'Number of fruits'
}
},
tooltip: {
headerFormat: '<b>{point.key}</b><br>',
pointFormat: '<span style="color:{series.color}">\u25CF</span> {series.name}: {point.y} / {point.stackTotal}'
},
plotOptions: {
bar: {
depth: 40
}
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2, 2, 7, 8, 4]
}, {
name: 'Joe',
data: [3, 4, 4, 2, 5, 4, 3, 5, 3]
}, {
name: 'Jane',
data: [2, 5, 6, 2, 1, 4, 5, 3, 6]
}, {
name: 'Janet',
data: [3, 0, 4, 4, 3, 2, 3, 1, 3]
}]
}).highcharts();
var xAxis = chart.xAxis[0],
box0 = xAxis.ticks[xAxis.tickPositions[0]].label.getBBox(true),
box1 = xAxis.ticks[xAxis.tickPositions[1]].label.getBBox(true);
assert.equal(
box0.x + box0.width <= box1.x,
true,
'No overlap'
);
});
QUnit.test("X axis label rotation ignored step(#3971)", function (assert) {
var chart = $('#container').highcharts({
xAxis: {
categories: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
labels: {
step: 1,
rotation: 1, // try to set to '0'
staggerLines: 1
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
}).highcharts();
assert.strictEqual(
chart.xAxis[0].tickPositions.length,
60,
'No ticks are skipped'
);
});
QUnit.test("Auto label alignment is still working when step is set", function (assert) {
var chart = $('#container').highcharts({
chart: {
marginBottom: 80
},
xAxis: {
categories: ['Loooooong', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
labels: {
step: 1,
rotation: -90
}
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
}).highcharts();
assert.strictEqual(
chart.xAxis[0].labelAlign,
'right',
'Rigth aligned'
);
}); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.