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

オープン
#485 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

plotly/dash-ag-grid のほかの issue

plotly/dash-ag-grid の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。