Changing the legend in a Bar Chart in Vision


I have a bar chart in Vision that shows historical tag data for multiple tags, however the legend shows the full tag path which is a lot of unnecessary information for the user. How can I edit the text in the legend?

How are you setting the data property of the Chart?

The labels in the legend are set by the Column Titles in the data dataset of the chart.

If you are using a Tag History Binding then you can Change the Column Name for each Tag Path selected.

If you are using a script to populate the data by calling system.tag.queryTagHistory then you can provide a list of column names, otherwise it defaults to the tag paths.

From the manual

List[String] columnNames - Aliases that will be used to override the column names in the result dataset. Must be 1-to-1 with the Tag paths. If not specified, the Tag paths themselves will be used as column titles. [optional]

I was using the system.tag.queryTagHistory in a script, and your suggestion worked! Thank you!