How to create multiple X axis for a single dataset in classic chart

Hi,
I have one dataset with value

i want to use 3 X axis for the single dataset in classic chart.

how to create multiple x axis for single dataset?

Please help me out

Vision or Perspective?

@zacht for vision

You can use the chart customizer to add additional axes to the chart. You will have to split your dataset, but that shouldn't be too difficult.

Do you have a picture or example of what you want the chart to look like? I’m having trouble picturing three X-axes for this data.

Regardless of how the final product will look, it appears that the Chart component is set up to set axis designation by dataset. The easiest thing might be to store this dataset as a custom property and make several smaller datasets (maybe using system.dataset.filterColumns and runScript) on which you can manipulate the axis designation in the Chart Customizer. The big dataset would be disabled in the Chart Customizer. The smaller datasets would control what is viewed.

Thanks I will checj your scripting

Actually I am using system.tag.query for getting The data for plotting… For each tag I am using diffent timing system tag query. After geting the second dataset, I adding the value row of second dataset to first dataset column…so I am getting only one dataset with timestamp of first dataset.

So I am actually planing to show diffent x axis for second tag…

Just a note, generally the X-Axis is the Time Axis, and each tag would be given it’s own Y-Axis, Assuming the units/scaling change per tag.

Using multiple X-Axis is possible, just unconventional, so requires a bit more setup than otherwise.

current_data = event.source.parent.getComponent('Chart').Data
print current_data
#system.dataset.deleteRow(current_data, 22060)
#offset = 5
endTime = system.date.now()
endTime = system.date.addMinutes(endTime, 0)
startTime = system.date.addMinutes(endTime, -180)
print startTime, endTime
#current_data.getRowCount()
dataSet = system.tag.queryTagHistory(paths=['[MQTT Engine]Edge Nodes/Robertsbridge/Line/Additives/Dry Additives/Stucco/Feed System_1/Material/Flow_PV'], startDate=startTime, endDate=endTime, returnSize=current_data.getRowCount(), aggregationMode="Average", returnFormat='Wide')
print dataSet


columnName = str(tag.getValueAt(0, 0))
colCount = current_data.getColumnCount()
columnData = []

for i in range(dataSet.getRowCount()):
	columnData.append(dataSet.getValueAt(i,1))
	
dataSet = system.dataset.addColumn(current_data, colCount, columnData, columnName, float)
event.source.parent.getComponent('Chart').Data = dataSet

this is the script i am using to add row value of second dataset with first dataset column
from that can able to plot x axis for second tag?
its possible to hide y axis correct?

If you want to plot multiple values they must share at least 1 value, by default in Ignition the X-Axis is shared and that Axis usually represents time.

The dataset you are showing would easily be charted where t_stamp is represented as the X-Axis and each value column is then shown as a tag value. What is the purpose of multiple X-Axis in reference to the dataset you have shown?

Are you trying to create a chart where the Y-Axis is the shared Time Axis?

What is the purpose of multiple X-Axis in reference to the dataset you have shown?
because this is the reason After geting the second dataset, I adding the value row of second dataset to first dataset column…so I am getting only one dataset with timestamp of first dataset.
so i want to show the second dataset timestamp in the separate x axis. so they will understand
yes timestamp only i want to show in x axis
i am applying offset to the second tag… so timestamp of second tag will be different. that i want to show in separate axis

You will need two separate datasets in order to make this work, or three if you want three separate X-Axis with Independent Y-Axis.

I really, really struggle with the Idea that you need more than one time axis, after all Time is Time.

2 Likes

@lrose I will try to use separate dataset for each tag. Thanks for your time