ngx-echarts icon indicating copy to clipboard operation
ngx-echarts copied to clipboard

Most of EChartsOption and connected fields ts types are not exported

Open egorwow70 opened this issue 1 year ago • 2 comments

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 avatar Dec 15 '23 10:12 egorwow70

Can't you just import from echarts?

import {
  GridComponentOption
} from "echarts";

semla avatar Dec 18 '23 08:12 semla

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

egorwow70 avatar Jan 03 '24 11:01 egorwow70