MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / getDatasetModel

Function getDatasetModel

libs/echarts/echarts.simple.js:21082–21093  ·  view source on GitHub ↗

* If return null/undefined, indicate that should not use datasetModel.

(seriesModel)

Source from the content-addressed store, hash-verified

21080 * If return null/undefined, indicate that should not use datasetModel.
21081 */
21082function getDatasetModel(seriesModel) {
21083 var option = seriesModel.option;
21084 // Caution: consider the scenario:
21085 // A dataset is declared and a series is not expected to use the dataset,
21086 // and at the beginning `setOption({series: { noData })` (just prepare other
21087 // option but no data), then `setOption({series: {data: [...]}); In this case,
21088 // the user should set an empty array to avoid that dataset is used by default.
21089 var thisData = option.data;
21090 if (!thisData) {
21091 return seriesModel.ecModel.getComponent('dataset', option.datasetIndex || 0);
21092 }
21093}
21094
21095/**
21096 * The rule should not be complex, otherwise user might not

Callers 3

prepareSourceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected