Comments (2)
Tick.prototype.moveLabel = function (str, labelOptions) {
var tick = this, label = tick.label, moved = false, xAxis = tick.axis, chart = xAxis.chart, labelPos, reversed = xAxis.reversed, inverted = chart.inverted, xPos, yPos;
if (label && label.textStr === str) {
tick.movedLabel = label;
moved = true;
delete tick.label;
}
else { // Find a label with the same string
objectEach(xAxis.ticks, function (currentTick) {
if (!moved &&
!currentTick.isNew &&
currentTick !== tick &&
currentTick.label &&
currentTick.label.textStr === str) {
tick.movedLabel = currentTick.label;
moved = true;
currentTick.labelPos = tick.movedLabel.xy;
delete currentTick.label;
}
});
}
// Create new label if the actual one is moved
// if (!moved && (tick.labelPos || label)) {
if (!moved && (tick.labelPos || _.get(label,'xy',false))) {
labelPos = tick.labelPos || label.xy;
xPos = inverted ?
labelPos.x : (reversed ? 0 : xAxis.width + xAxis.left);
yPos = inverted ?
(reversed ? (xAxis.width + xAxis.left) : 0) : labelPos.y;
tick.movedLabel = tick.createLabel({ x: xPos, y: yPos }, str, labelOptions);
if (tick.movedLabel) {
tick.movedLabel.attr({ opacity: 0 });
}
}
};
from highcharts-ng.
1
from highcharts-ng.
Related Issues (20)
- How to dynanically change chart to percentage change? HOT 2
- Firefox tooltip performance (maybe more than just tooltips) HOT 1
- 有段数据在highstock里展示有问题,求解原因~why? HOT 1
- ensureIds makes the performance very slow
- Sankey type of chart doen't work. HOT 1
- Errorbar series not showing HOT 1
- Annotation Issue with highcharts-ng HOT 2
- support angular4 ?
- Zoom multiple highcharts simultaneously HOT 1
- Highchart rangeSelector is not showing after highchartjs, highchart-ng upgrade HOT 1
- highcharts-ng polar windrose loaded from table with the data module
- Highcharts-ng 0.0.13 polar windrose HOT 1
- Bug on highcharts 7
- Example links in readme are broken
- how to get chart object in angular7, for re-rendering?
- Is there any way to use two chart config on the same container?
- Generated SVG references specification through http
- How to configure Map with overlaid pie charts function in map config.
- out of stack space using IE11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from highcharts-ng.