xieziyu / ngx-echarts

An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
https://xieziyu.github.io/ngx-echarts/
MIT License
1.11k stars 197 forks source link

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

Open egorwow70 opened 11 months ago

egorwow70 commented 11 months ago

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?

semla commented 11 months ago

Can't you just import from echarts?

import {
  GridComponentOption
} from "echarts";
egorwow70 commented 10 months ago

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