question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nameTextStyle doesn't work

See original GitHub issue

Version

5.2.2

Steps to reproduce

xAxis: {
  type: 'category',
  data: ['foo', 'bar', 'baz'],
  inverse: false,
  nameTextStyle: {
    align: 'center',
    verticalAlign: 'middle',
  },
}

What is expected?

Horizontal axis labels are positioned INSIDE of the bars.

What is actually happening?

Horizontal axis labels are positioned BELOW the bars.


The property nameTextStyle has no effect.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pissangcommented, Nov 30, 2021

@GirkovArpa Perhaps you can try using another dummy transparent series to display the labels C, D. Here is an example:

option = {
  xAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
    axisLabel: { show: false } // Not show labels on the axis.
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [120, 200, 150, 80, 70, 110, 130],
      type: 'bar',
      // Make sure bar are overlapped.
      barGap: '-100%',
      label: {
        show: true,
        position: 'top'
      }
    },
    {
      data: [120, 200, 150, 80, 70, 110, 130],
      type: 'bar',
      itemStyle: {
        color: 'transparent'
      },
      label: {
        show: true,
        position: 'insideTop',
        color: '#fff',
        fontSize: 20,
        formatter: '{b}'
      }
    }
  ]
};
0reactions
GirkovArpacommented, Nov 30, 2021

Perfect, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to align the x-Axis name label to the end of the x-Axis
The horizontal aligment is easy and works as expected: nameLocation: 'end'; nameTextStyle.align: 'right'; set nameGap=0 : the default is 15 ...
Read more >
Documentation - Apache ECharts
Apache ECharts, a powerful, interactive charting and visualization library for browser.
Read more >
[GitHub] [echarts] Ovilia commented on issue #16123 ...
[GitHub] [echarts] Ovilia commented on issue #16123: nameTextStyle doesn't work · GitBox Sun, 28 Nov 2021 19:24:06 -0800. Ovilia commented on issue #16123: ......
Read more >
Plotly not working with grafana 9 - Dashboards
It doesn't work for this version of grafana ... nameLocation: 'middle', nameGap: 30, nameTextStyle: { fontWeight: 'bold', } ...
Read more >
How to customize TrackOverlay - WinForms - ThinkGeo Discussion ...
But when I add it in to CustomStyles collection I get a run time error which says I can't ... TextStyle nameTextStyle =...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found