ngx-echarts | An angular directive for ECharts | Chart library
kandi X-RAY | ngx-echarts Summary
kandi X-RAY | ngx-echarts Summary
An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ngx-echarts
ngx-echarts Key Features
ngx-echarts Examples and Code Snippets
Community Discussions
Trending Discussions on ngx-echarts
QUESTION
I'm using Echarts v5.2.2 (in an Angular project, with ngx-echarts) to render a line chart using multiple series. I have a listener for the 'highlight' event. This event is giving me an object with a batch of seriesIndex
and dataIndex
but it doesn't provide the color of each series.
Is there a way to get the colors that were dynamically assigned by echarts?
This is what I'm trying to implement:
- Listen when the mouse pointer snapped into a graph line point.
- Doing this via
this.chartInstance.on('highlight', this.handleShowTip);
.
- Doing this via
- Use the batch of
seriesIndex
&dataIndex
where the mouse pointer snapped to render a table using color, x & y value as columns (the table is placed outside the graph.
I understand that I could use the tooltip's formatter option with a callback function which will provide the series colors in its arguments... and I could broadcast these arguments outside my graph component to render what I need anywhere I want, but this does not feel correct (a formatter is aimed to return HTML or string) and I wonder if there's a better way to get the generated series colors.
Thank you!
...ANSWER
Answered 2022-Jan-20 at 11:10The Echarts uses a built-in palette based on the theme. The easiest way to get a set of colors is this:
QUESTION
I upgraded my angular project from 8 to 12. After that I migrated to eslint. Then onwards my compilation is not immediately invoked after saving any file. If I save any file after 2min the compilation starts in the terminal.
This is the issue I'm facing. Thanks in advance. Please let me know what is causing it to be slow and time taking. Is it with vscode or Angular config issues.
Package.json
...ANSWER
Answered 2021-Jun-17 at 13:35This is solved. It is caused because of serve configuration doesn't have the development mode configuration set in angular.json file. May be this cofiguration is removed when im upgrading to Angular 12 but not sure.
After adding the below two code blocks, My compilation issue is fixed and its immediately recompiles when a file is saved.
QUESTION
I am using Angular 9 along with "ngx-echarts": "5.2.2"
and "echarts": "5.0.0"
Everything works fine accept while setting icon: 'circle'
for legends. It says below thing.
Type '{ icon: string; top: string; left: string; orient: "vertical"; }' is not assignable to type 'LegendOption | ScrollableLegendOption | (LegendOption | ScrollableLegendOption)[]'.
As per example in ngx-echarts I can't use import { EChartOption } from 'echarts'
;
I have checked that icon is available in EchartOption instead of Echarts
Option
Is there anything i am missing?
After installing @types/echarts my code is working and showing legend with circle icon but have random error that it can't find EchartOption in echarts (My angular is not taking care of this and running application by ignoring this error)
RIght now i went with import { EChartsOption } from 'echarts';
and removed @types/echarts library. And i can't change legend icon for the moment :(
Any help?
Thanks, Jayesh
...ANSWER
Answered 2021-Apr-16 at 12:58When yo use echarts 5 you MUST NOT install @types/echarts, because echarts 5 is now written in typescript: i.e. the echarts package already includes the correct types for this version.
There have been many changes between echarts 4 and echarts5 - one of them is that EchartOption is now called EchartsOption (with plural "s")
QUESTION
I have taken checkout of angular project and trying to run ng serve
with this command I am getting the following error.
ANSWER
Answered 2020-Sep-11 at 06:38it is version mismatch, just update all dependencies with npm-check-updates
QUESTION
I got this when I was using ngx-echarts. When using versions 4.x.x everything worked fine. After an npm i the application failed to run.
...ANSWER
Answered 2020-Nov-17 at 04:42The problem was because of a version update in ngxe-charts. If using versions >5.0 use this in app.module
QUESTION
I am working on the angular application, When I open my project it is giving me the error like below
...ANSWER
Answered 2020-Sep-11 at 09:43import NgxEchartsModule
in your app module (or any other proper angular module):
With Dynamic import
QUESTION
My parent component call function on two childs components. I have an error on the second component.
Parent Component
...ANSWER
Answered 2020-Apr-26 at 01:06You haven't add ngx-accordion in parent.html template. Thats why its breaking. Other component working as its available in your parent.html
QUESTION
here's the code:
https://stackblitz.com/edit/ngx-echarts-odv9rp?file=src/app/app.component.html
TS
...ANSWER
Answered 2020-Mar-19 at 06:55Use interval:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ngx-echarts
v8.x for Angular >= 13
v7.x for Angular >= 11
v6.x for Angular >= 10, < 11
v5.x for Angular >= 6, < 10
v2.3.1 for Angular < 6 (Please refer to https://github.com/xieziyu/ngx-echarts/blob/v2.x/README.md)
If you need ECharts GL support, please install it first:. Import other extensions such as themes or echarts-gl in your main.ts: ECharts Extensions.
Since v5.0 # if you use npm npm install echarts -S npm install ngx-echarts -S # or if you use yarn yarn add echarts yarn add ngx-echarts
If you need ECharts GL support, please install it first: npm install echarts-gl -S # or yarn add echarts-gl
Import other extensions such as themes or echarts-gl in your main.ts: ECharts Extensions
import echarts and provide it in NgxEchartsModule.forRoot({ echarts }).
NgxEchartsCoreModule is removed.
Please refer to ECharts Documentation for more details.
Since version 5.0.1 ECharts supports Treeshaking with NPM.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page