Comments (4)
I think we should support the no-data-to-display
module. It seems like the standardized way of handling the "no data" use case.
Including the no-data-to-display
module should still be optional and we should fallback to something reasonable (perhaps the current solution).
Can you send a PR for this?
from ember-highcharts.
I had also tried to show a label of noData message as a second fallback when highcharts 'no-data-to-display' module was not imported, just similar as what the module did. But I failed to align the label at center of the chart both in horizontal and vertical. Here is the sample code, you can continue working on it if you have interests.
buildOptions: computed('chartOptions', 'content.[]', function() {
let chartOptions = $.extend(true, {}, get(this, 'theme'), get(this, 'chartOptions'));
let defaults = {};
let chartContent = get(this, 'content');
// if 'no-data-to-display' module has been imported, keep empty series and leave it to highcharts to show no data label.
if (!get(this, 'content.length') && !Highcharts.Chart.prototype.showNoData) {
let defaultOptions = Highcharts.getOptions();
var hasLabels = (chartOptions.labels && chartOptions.labels.items && chartOptions.labels.items.length);
// Preferred to show chart labels rather than an empty series.
if (defaultOptions.lang.noData && !hasLabels) {
defaults = assign(defaults, {
labels: {
items: [{
html: defaultOptions.lang.noData,
style: {
fontWeight: 'bold',
color: '#666',
// There's no way to place the label at the exactly center, so it's not good enough. I don't know if there is a way for that.
left: 400,
top: 200
}
}]
}
});
} else {
// This is the very original implementation, keep it as the last fallback.
// However don't know how it works for promoting no data message, at least the data should be an array?
chartContent = [{
id: 'noData',
data: 0,
color: '#aaaaaa'
}];
defaults = assign(defaults, { series: chartContent });
}
}
return assign(defaults, chartOptions);
}),
from ember-highcharts.
hi all. I am also new to this topic. did the installation as the instructions. but with parameters and output graphs does not work. if there is a specialist ready to pay for the work that would chart displayed on the website.
from ember-highcharts.
Fixed by #98
from ember-highcharts.
Related Issues (20)
- How write integration/acceptance tests with ember-highcharts? HOT 1
- Upgrade Hightcharts to get fix for getDistanceBetweenCirclesByOverlap logic HOT 1
- Cannot read property "forExport" of undefined HOT 3
- Build error with highcharts v7.1.2 in styled mode HOT 1
- Upgrade bootstrap to fix cross-site scripting vulnerability
- How to add support to accessibility? HOT 1
- How to pass an object to Highcharts.setOptions HOT 1
- Series with the same name (`series.name`) are "mysteriously" dropped when chart is re-rendered. HOT 1
- Changing Series changes order HOT 1
- ‘Cannot read property "forExport" of undefined’ when transitioning to a new route. HOT 1
- Replacing xAxis, and yAxis HOT 2
- [Octane] Glimmer component refactor HOT 1
- Modifier manager capabilities deprecating warning HOT 8
- I think v3.2.0 should have been a major version HOT 5
- How can one use Annotation module of highchart using ember-highcharts? HOT 1
- Getting https://assets.highcharts.com/errors/16/ error on EmberJS application HOT 2
- Replace `ember-holy-futuristic-template-namespacing-batman` with `ember-template-imports` HOT 2
- Using custom components in a chart
- Question: Can we use highchart version: 8.0.0 with ember-highchart version: 3.1.0 ? HOT 1
- Release v3.2.2 for assign polyfill deprecation HOT 2
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 ember-highcharts.