Comments (10)
Since we've split the .d.ts files (see: #20727) that is probably correct.
Okay, this led me to figure out how to to get it working by basically having to explicitly import the SeriesLineOptions
and SeriesColumnOptions
types:
import type { SeriesColumnOptions, SeriesLineOptions } from 'highcharts';
const series: Array<
| Highcharts.SeriesAreaOptions
| SeriesColumnOptions
| SeriesLineOptions
| Highcharts.SeriesSplineOptions
> = [];
Though this works, I'm not sure why I have to explicitly import those particular types when I could use the globally available Highcharts
to use SeriesAreaOptions
& SeriesSplineOptions
. In fact, I'm not even sure why / how a global Highcharts
is available since I don't have anything explicit in my tsconfig.json
to do so.
from highcharts.
Hi @denchen!
Can you please walk me through how to recreate that?
I've tried with the latest version and I don't get any errors- see the demo.
As you can see this interface exists here with v11.4.1
from highcharts.
Yeah, I see that exact line in node_modules/highcharts/highcharts.d.ts
on 11.4.0, but I don't see it on 11.4.1
For 11.4.0, the file size is:
$ ls -l node_modules/highcharts/highcharts.d.ts
-rw-r--r-- 1 denchen staff 23029484 Apr 5 00:25 node_modules/highcharts/highcharts.d.ts
For 11.4.1, the file size is:
$ npm install [email protected] --save-dev
changed 1 package, and audited 2376 packages in 2s
16 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$ ls -l node_modules/highcharts/highcharts.d.ts
-rw-r--r-- 1 denchen staff 3735521 Apr 5 00:28 node_modules/highcharts/highcharts.d.ts
So around 1/7th the size.
from highcharts.
Since we've split the .d.ts
files (see: #20727) that is probably correct.
Can you please help me recreate that?
Probably the tsconfig
and the way you import and resolve modules matter.
from highcharts.
I updated to 11.4.1 and our project now gets error missing Highcharts.SeriesPieOptions
We used to only need to import
import Highcharts from 'highcharts/es-modules/masters/highcharts.src';
Not sure what to import now. I cannot find it defined anywhere in the es-modules folder.
from highcharts.
@rbirkgit
These types are not expected to be missing. Maybe your editor needs to reload the project.
You can try to import to explicitly set types to the Highcharts
namespace:
import 'highcharts/options/pie.src';
Alternative might be to access the type via registry:
type SeriesPieOptions = Highcharts.SeriesOptionsRegistry['SeriesPieOptions'];
If no workaround helps, please share your project configuration, so we can try to replicate the issue.
from highcharts.
In fact, I'm not even sure why / how a global Highcharts is available since I don't have anything explicit in my tsconfig.json to do so.
The import of the Highcharts master creates a global namespace of itself for shared typing between multiple modules. This is just for easier access of types, but not necessarily available during runtime. It is recommended to access types via regular imports with named members.
from highcharts.
We get error on compile, so it's not an editor issue.
All we have is this import (to use ESM)
import Highcharts from 'highcharts/es-modules/masters/highcharts.src';
Then in our code:
export const DONUT_CHART_SERIES_BASE: Highcharts.SeriesPieOptions = {
type: 'pie',
data: []
};
This is the error:
Error: apps/accounts-and-resources/src/app/accounts-and-resources/highcharts.constants.ts:52:50 - error TS2724: '"D:/Git/cloud-ui/node_modules/highcharts/highcharts"' has no exported member named 'SeriesPieOptions'. Did you mean 'SeriesOptions'?
52 export const DONUT_CHART_SERIES_BASE: Highcharts.SeriesPieOptions = {
~~~~~~~~~~~~~~~~
from highcharts.
I opened a separate issue for my problem here: #20986
Lets' switch to there to keep this thread about the original issue.
from highcharts.
Thank you all. From what I can see all of the issues here are resolved. Closing as not a bug for now.
from highcharts.
Related Issues (20)
- Range Selector dropdown doesn't open in Gantt chart HOT 3
- Map changes January 2024: Norwegian County and municipalities HOT 1
- `decimalPoint` / `thousandsSep` not applied properly for `tooltip` and `dataLabels` when using `format` and `{point.y}` HOT 2
- Cannot increase size of legend symbol without increasing size of series point HOT 4
- Arrow Keys on heatmap Not Functional When Screenreader Active HOT 4
- Tooltip with `stickOnContact` and `outside` freezes when moving to another chart HOT 3
- Missing `pointOutsideOfBreak` property within the docs
- Highcharts.SeriesPieOptions is missing with 11.4.1 HOT 6
- xAxis gridLines overflow when using mouse wheel zoom HOT 1
- New annotation position not respected after moving, copying and reexporting HOT 7
- Screen reader not reading legends HOT 11
- Font awesome icons missing in the gauge kpi demo
- Bug: Plotline label with verticalAlign: bottom should not extend lower than the edge of the chart HOT 2
- Customizing Navigator Button Style and Retrieving Last Selected Button Details HOT 8
- dataLabels overflow chart, when axis position is changed
- Support in tables as source for different thousand and decimal separators
- Column data labels are not contrasted with respect to plot background in case of Stacking and text outline is set to 0px. HOT 1
- getExtremesFromAll property loads and iterates on all points in DOM and slows down performance of chart render and scroll. HOT 5
- Restriction of keyboard navigation for specific keys not working HOT 1
- Ability to add a footer row to the DataGrid HOT 6
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.