Sparklines always use AG Charts Enterprise, so a Grid-only Enterprise license shows a watermark

未关闭
#485 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
javascript, python, react
领域
frontend

调研方向

Start with AgGridEnterprise.react.js and compare how SparklinesModule is registered with how IntegratedChartsModule follows dashChartMode. Check the Sparklines and enterprise licensing documentation cited in the issue. Done means Grid-only Enterprise licenses can use sparklines without a Charts watermark, and the docs explain the licensing requirements for each mode.

由索引模型根据 Issue 内容生成。

描述

AgGridEnterprise.react.js always registers sparklines with AG Charts Enterprise:

ModuleRegistry.registerModules([
    AllEnterpriseModule,
    SparklinesModule.with(AgChartsEnterpriseModule),
]);

AG Charts Enterprise does its own license check and only accepts keys of type Charts ([02]) or Grid + Charts ([0102]). Teams with an AG Grid Enterprise (Grid-only, [01]) license therefore get the AG Charts watermark on every sparkline:

  • dash-ag-grid 33.3.x: "License Key Not Found" / "For Trial Use Only". The grid's licenseKey is never passed to the charts license manager.
  • dash-ag-grid 35.x: passing the Grid key as chartsLicenseKey (or using dashChartMode="enterprise") gives "Invalid License" / "Incompatible License Key" instead.

The grid itself validates correctly, and the watermark doesn't show on localhost. That's why the problem tends to show up only after deployment.

Why this matters

AG Grid documents that sparklines can be powered by either AG Charts Community or AG Charts Enterprise (Sparklines Installation). AG Grid support confirmed to us in writing that sparklines registered as SparklinesModule.with(AgChartsCommunityModule) are fully covered by an AG Grid Enterprise license, with no AG Charts license needed. They also said that changing the wrapper's module registration is something only Plotly can do.

So at the moment, dash-ag-grid users who have a valid AG Grid Enterprise license can't use sparklines without a watermark, even though their license covers them.

The Dash docs (Sparklines, Using AG Grid Enterprise) only mention enableEnterpriseModules + licenseKey. They don't mention that sparklines need an AG Charts Enterprise (Bundle) key.

Proposal

Make the sparklines' charts module follow dashChartMode, the same way IntegratedChartsModule already does, and default to Community:

ModuleRegistry.registerModules([AllEnterpriseModule]);

export default function DashAgGridEnterprise(props) {
    const {licenseKey, chartsLicenseKey, dashChartMode} = props;
    if (licenseKey) {
        LicenseManager.setLicenseKey(licenseKey);
    }
    if (dashChartMode === 'enterprise') {
        const effectiveChartsLicenseKey = chartsLicenseKey || licenseKey;
        if (effectiveChartsLicenseKey) {
            AgChartsLicenseManager.setLicenseKey(effectiveChartsLicenseKey);
        }
        ModuleRegistry.registerModules([
            IntegratedChartsModule.with(AgChartsEnterpriseModule),
            SparklinesModule.with(AgChartsEnterpriseModule),
        ]);
    } else {
        if (dashChartMode) {
            ModuleRegistry.registerModules([
                IntegratedChartsModule.with(AgChartsCommunityModule),
            ]);
        }
        ModuleRegistry.registerModules([
            SparklinesModule.with(AgChartsCommunityModule),
        ]);
    }
    return <MemoizedAgGrid {...props} />;
}

(Alternatively, add a separate prop such as dashSparklineChartMode.) We'd also suggest adding a note to the Sparklines docs page about which license is needed for each mode.

Environment
  • dash-ag-grid 33.3.3 (AG Grid 33.3.2); behavior checked against main (35.3.0)
  • enableEnterpriseModules=True, licenseKey=<AG Grid Enterprise, Grid-only v3 key>
  • Column with "cellRenderer": "agSparklineCellRenderer" (bar sparkline)
  • Deployed behind a non-localhost hostname
主要语言
Python
星标
239
派生
48
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

plotly/dash-ag-grid 的其他 Issue

查看 plotly/dash-ag-grid 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。