Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most of EChartsOption and connected fields ts types are not exported #415

Open
egorwow70 opened this issue Dec 15, 2023 · 2 comments
Open

Comments

@egorwow70
Copy link

egorwow70 commented Dec 15, 2023

Hello, ngx-echarts team,

I am using ngx-echarts library in the frontend angular application. I want to build my own service with predefined entities, like f.e. grid, text_style, axis_label etc., that will be used in the EChartsOption

public static readonly GRID = {
  top: '15%',
  left: '0%',
  right: '0%',
  bottom: '0%',
  containLabel: true,
}

public static readonly TEXT_STYLE = {
  color: this.TEXT_COLOR,
  fontSize: 14,
  fontWeight: 400,
};

public static readonly AXIS_LABEL = {
  show: true,
  lineHeight: 14,
};

But the trouble comes here, that most of echarts ts types are not exported from the library, that's why currently it is only possible to hardcode objects. Is it possible to export all types, that are connected to the EChartsOption type?

@egorwow70 egorwow70 changed the title most of types are not exported Most of ts types are not exported Dec 15, 2023
@egorwow70 egorwow70 changed the title Most of ts types are not exported Most of EChartsOption fields ts types are not exported Dec 15, 2023
@egorwow70 egorwow70 changed the title Most of EChartsOption fields ts types are not exported Most of EChartsOption and connected fields ts types are not exported Dec 15, 2023
@semla
Copy link

semla commented Dec 18, 2023

Can't you just import from echarts?

import {
  GridComponentOption
} from "echarts";

@egorwow70
Copy link
Author

egorwow70 commented Jan 3, 2024

Can't you just import from echarts?

import {
  GridComponentOption
} from "echarts";

@semla GridComponentOption is working, but what's about other things like axisLine, lineStyle, splitLine etc.?

so it seems the first component option level options are exported, but deep nested things aren't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants