---
title: "Add sample data to SPC chart tool tip 3.0"
id: "add-sample-data-to-spc-chart-tool-tip-3-0"
project: "Knowledge Base"
url: "https://docs.sepasoft.com/articles/knowledge-base/add-sample-data-to-spc-chart-tool-tip-3-0"
updated: 2026-07-23T18:08:21Z
---

# Add sample data to SPC chart tool tip 3\.0

## Overview

The arguments of extension function (getSampleToolTip) includes the **sampleUUID** of the currently hovered sample. The [sample object](/articles/user-manual/Sample) can be retrieved with this sampleUUID.

### Applies To and Version Info

This feature applies to SPC module and is available in version 3.8.x or greater.

### Steps

1. Right-click the SPC component and click on **Scripting...**
2. Select the extension function: **getSampleToolTip**
3. Obtain the sample through scripting. An example is given below.

![](/resources/Storage/knowledge-base/add-sample-data-to-spc-chart-tool-tip-3-0/image2022-12-22_15-8-31.png)

## Scripting

In this example, the date and time on which the sample was taken are returned after changing the default date format.

Code

```
sample = system.mes.spc.sample.getSample(sampleUUID)
taken = sample.getSampleTakenDateTime().getTime()
fmtTime = system.db.dateFormat(taken, "MM-dd h:mm a")
return '%s %s' %(defaultToolTip, fmtTime)
```

##