# Name not appearing for one trace

**URL:** <https://community.plotly.com/t/name-not-appearing-for-one-trace/38333>\
**Category:** plotly.js\
**Created:** [April 24, 2020, 8:52am UTC](https://community.plotly.com/t/name-not-appearing-for-one-trace/38333 "2020-04-24T08:52:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yash1](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@yash1](https://community.plotly.com/u/yash1)\
**Post date:** [April 24, 2020, 8:52am UTC](https://community.plotly.com/t/name-not-appearing-for-one-trace/38333/1 "2020-04-24T08:52:30Z")

</div>

I have my code like this :

```
  if (response.data.apiName) {
    $scope.metricsData = response.data;
    traceArray = [];
    for (var k = 0; k < response.data.apiName.length; k++) {
      
      traceJson = {
        x: ["Services"],
        y: [response.data.weight[k] * 100],
        type: 'bar',
        text: response.data.totalCount[k],
        textposition: 'auto',
        hoverinfo: 'y',
        name: response.data.apiName[k],
        marker: {
          // color: randomcolor,
          opacity: 0.6,
          line: {
            // color: randomcolor,
            width: 1.5
          }
        }
      };
      traceArray.push(traceJson)
    }

```

Also, if I am using hoverinfo:x+y+name, it works but the name doesn’t show all the characters as it is long.  
I am already using text so how to manage if I want to display the full name.

---

<div class="post-metadata">

**Author:** ![Emmanuelle](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/emmanuelle/32/7853_2.png) [@Emmanuelle](https://community.plotly.com/u/Emmanuelle)\
**Post date:** [April 25, 2020, 8:44am UTC](https://community.plotly.com/t/name-not-appearing-for-one-trace/38333/2 "2020-04-25T08:44:47Z")

</div>

Hi @yash1 welcome to the forum! You can set the `layout['hoverlabel']['namelength]` [https://plotly.com/javascript/reference/#layout-hoverlabel-namelength](https://plotly.com/javascript/reference/#layout-hoverlabel-namelength) to a large value so that the whole name appears.
