Centralize chart data directory name
This commit is contained in:
parent
32ef54e037
commit
4849003338
2 changed files with 5 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
|||
import 'dart:convert';
|
||||
|
||||
/// Directory (relative to the deck) where linked chart CSVs are kept, so the
|
||||
/// data files stay tidily in one place — separate from images/media.
|
||||
const String chartDataDirName = 'data';
|
||||
|
||||
/// Supported chart kinds for a chart slide.
|
||||
enum ChartType { bar, line, pie }
|
||||
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ class FileService {
|
|||
final spec = ChartSpec.parse(s.customMarkdown);
|
||||
final src = spec.source;
|
||||
if (src == null) return s;
|
||||
final rel = addAsset(src, 'data');
|
||||
final rel = addAsset(src, chartDataDirName);
|
||||
if (rel == null) {
|
||||
return s.copyWith(
|
||||
customMarkdown: spec.copyWith(clearSource: true).toBlock(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue