(sourceData, thisMetaRawOption, // can be null. If not provided, auto detect it from `sourceData`.
sourceFormat, encodeDefine // can be null
)
| 19786 | return val instanceof SourceImpl; |
| 19787 | } |
| 19788 | function createSource(sourceData, thisMetaRawOption, // can be null. If not provided, auto detect it from `sourceData`. |
| 19789 | sourceFormat, encodeDefine // can be null |
| 19790 | ) { |
| 19791 | sourceFormat = sourceFormat || detectSourceFormat(sourceData); |
| 19792 | var seriesLayoutBy = thisMetaRawOption.seriesLayoutBy; |
| 19793 | var determined = determineSourceDimensions(sourceData, sourceFormat, seriesLayoutBy, thisMetaRawOption.sourceHeader, thisMetaRawOption.dimensions); |
| 19794 | var source = new SourceImpl({ |
| 19795 | data: sourceData, |
| 19796 | sourceFormat: sourceFormat, |
| 19797 | seriesLayoutBy: seriesLayoutBy, |
| 19798 | dimensionsDefine: determined.dimensionsDefine, |
| 19799 | startIndex: determined.startIndex, |
| 19800 | dimensionsDetectedCount: determined.dimensionsDetectedCount, |
| 19801 | encodeDefine: makeEncodeDefine(encodeDefine), |
| 19802 | metaRawOption: clone(thisMetaRawOption) |
| 19803 | }); |
| 19804 | return source; |
| 19805 | } |
| 19806 | /** |
| 19807 | * Wrap original series data for some compatibility cases. |
| 19808 | */ |
no test coverage detected
searching dependent graphs…