MCPcopy Index your code
hub / github.com/apache/echarts / retrieveRawValue

Function retrieveRawValue

src/data/helper/dataProvider.ts:500–533  ·  view source on GitHub ↗
(
    data: SeriesData, dataIndex: number,
    // If dimIndex is null/undefined, return OptionDataItem.
    // Otherwise, return OptionDataValue.
    dim?: DimensionLoose | NullUndefined
)

Source from the content-addressed store, hash-verified

498// value may be 0.91000000001, which have brings trouble to display.
499// TODO: consider how to treat null/undefined/NaN when display?
500export function retrieveRawValue(
501 data: SeriesData, dataIndex: number,
502 // If dimIndex is null/undefined, return OptionDataItem.
503 // Otherwise, return OptionDataValue.
504 dim?: DimensionLoose | NullUndefined
505): OptionDataValue | OptionDataItem {
506 if (!data) {
507 return;
508 }
509
510 // Consider data may be not persistent.
511 const dataItem = data.getRawDataItem(dataIndex);
512
513 if (dataItem == null) {
514 return;
515 }
516
517 const store = data.getStore();
518 const sourceFormat = store.getSource().sourceFormat;
519
520 if (dim != null) {
521 const dimIndex = data.getDimensionIndex(dim);
522 const property = store.getDimensionProperty(dimIndex);
523
524 return getRawSourceValueGetter(sourceFormat)(dataItem, dimIndex, property);
525 }
526 else {
527 let result = dataItem;
528 if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {
529 result = getDataItemValue(dataItem);
530 }
531 return result;
532 }
533}
534
535
536/**

Callers 6

getDefaultLabelFunction · 0.90
formatTooltipArrayValueFunction · 0.90
getFormattedLabelMethod · 0.90
getRawValueMethod · 0.90

Calls 7

getDataItemValueFunction · 0.90
getRawSourceValueGetterFunction · 0.85
getStoreMethod · 0.80
getDimensionIndexMethod · 0.80
getDimensionPropertyMethod · 0.80
getSourceMethod · 0.65
getRawDataItemMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…