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

Update Required type Opts ( and add support for SSR) #567

Open
RayaneSlimani opened this issue Mar 18, 2024 · 2 comments
Open

Update Required type Opts ( and add support for SSR) #567

RayaneSlimani opened this issue Mar 18, 2024 · 2 comments

Comments

@RayaneSlimani
Copy link

RayaneSlimani commented Mar 18, 2024

Update Required in Opts Between ECharts and ECharts-for-React, and Lack of SSR Support

Description:
Currently, there is a discrepancy between the options available for configuring a chart in ECharts and those used in the ECharts-for-React wrapper. Additionally, there is a lack of support for Server-Side Rendering (SSR) in the ECharts-for-React wrapper.

Problem:
In ECharts, the options are defined as follows:

opts= {
    devicePixelRatio?: number,
    renderer?: string,
    useDirtyRect?: boolean,
    useCoarsePointer?: boolean,
    pointerSize?: number,
    ssr?: boolean,
    width?: number|string,
    height?: number|string,
    locale?: string
}

However, in the ECharts-for-React wrapper, the options are defined differently:

export type Opts = {
  readonly devicePixelRatio?: number;
  readonly renderer?: 'canvas' | 'svg';
  readonly width?: number | null | undefined | 'auto';
  readonly height?: number | null | undefined | 'auto';
  readonly locale?: string;
};

Moreover, the ECharts-for-React wrapper lacks support for Server-Side Rendering (SSR), which is a crucial feature for many projects aiming to improve performance and SEO.

Proposed Solution:
Harmonize the options between ECharts and ECharts-for-React, either by aligning the definitions or providing clear documentation on how to translate between the two sets of options.
Implement Server-Side Rendering (SSR) support in the ECharts-for-React wrapper to enable rendering charts on the server side, improving performance and SEO.

image

@RayaneSlimani RayaneSlimani changed the title Update type Opts ( and add support for SSR) Update Required type Opts ( and add support for SSR) Mar 18, 2024
@RayaneSlimani
Copy link
Author

@hustcc up

@hustcc
Copy link
Owner

hustcc commented Apr 9, 2024

Can help me with a pr?

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