How can I display a drilldown label in HighCharts on a mobile device?

When viewing the chart on mobile devices, I notice that the drilldown data label for my pie chart is being truncated with ellipses. My goal is to adjust the styles so that the entire word "streaming" is displayed without any dots cutting off the bottom part of the word. Any suggestions on how to achieve this would be greatly appreciated.

Here are the current styles I am using:

drilldown: {
            activeDataLabelStyle: {
                color: 'black',
                fontSize: '14px',
            }
}
                

Answer №1

To set the text overflow style to clip in your code, utilize the textOverflow property. If you require adjustments to individual data label positioning, consider using either the y or x properties as demonstrated below:

    series: [{
        ...,
        dataLabels: {
            ...,
            style: {
                textOverflow: 'clip'
            }
        },
        data: [..., {
            ...,
            dataLabels: {
                y: -20
            }
        }]
    }]

Check out this live demonstration: http://jsfiddle.net/BlackLabel/9Lhokg4t/

For more detailed information, refer to the API Reference here: https://api.highcharts.com/highcharts/series.pie.dataLabels

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The rating and comment section is failing to adapt to smaller screens, creating a terrible user experience

I am a beginner with Sass and CSS. I wanted to create a rating and comment section which looks fine on a laptop screen, but appears off on smaller screens. It seems like the layout might be incorrect or maybe I didn't follow grid layout guidelines pro ...

Issues with Nuxt Authentication when deployed live

Attempting to deploy a nuxt application on a server with nginx acting as a proxy to localhost. Everything seems to be functioning properly; the application can be accessed using the server's domain and API calls can be made to the server. However, aut ...

What could be causing my CSS and HTML to display incorrectly in IE and Chrome browsers?

I am currently facing a challenge with my landing page design. The positioning of a specific div element seems to be correct in Internet Explorer, but it is misaligned in Chrome. Is there a way to ensure consistent display across different browsers? The pr ...

Testing Vue.js Components with Mocks and Unit Tests

When writing unit tests for a Vue.js 2 application that utilizes Vuex as a store, I have noticed a recurring pattern in many of my components: For example, consider the 'thing.vue' component: <template> <div> {{ thing.la ...

Use the no-repeat feature to set the background image in an Asp:Chart

I have been working with the asp:Chart control and have found that its BackImage property functions well. However, I have encountered two issues while trying to set the background image. I am unable to successfully set the no-repeat property of the Bac ...

Ensuring the input element is correctly aligned in its position

How can I center the input element inside its parent without any top margin? What CSS changes do I need to make? #menu { height:30px; background: #ccc; } #board-name { display:block; margin-left:auto; margin-right:auto; height: 80%; vertical-al ...

Decrease the padding value inherited from CSS while reducing the numerical value

One of the challenges I am facing is with a class that is added to different sections of a website to indicate that they are editable. This class is called .editable. Currently, when a user is logged in and hovers over an editable section, a red dashed bo ...

What is the best time to fetch the height of an element containing an image?

I am working on my web app and I want to implement a popup element that contains an <img> element. Typically, the image source is larger than necessary, so I resize it using CSS. However, before displaying the popup, I need to determine its outerHeig ...

Setting the default styling for unordered lists in Material-UI React is a breeze with these simple steps

Currently, I am attempting to recreate a basic blog using markdown with Next.js and Material-UI. However, it appears that something is stripping away the default styles from unordered lists. The list items (HTML elements) have been set with list-style: no ...

Synchronization issue between VueJS, Firebase Auth, and Route Guards leading to race conditions

Running into an issue while integrating Firebase Auth with my Vue app. After a page refresh, a logged in user is not recognized as such and gets redirected to the login page when trying to access a protected route. This occurs because the initial callback ...

The height of each Bootstrap column is equal to the height of its corresponding

I am trying to prevent the column height from being equal to the row height in Bootstrap. Here is my code snippet: <div class="row justify-content-center text-center"> <div class="col-sm-3"></div> <div class="col-sm-9"></d ...

How to vertically align text within a container in Bootstrap?

Lately, I've been facing a challenge in my attempts to vertically center text while also incorporating a full-width background image. The goal is for the centered text to maintain its position regardless of the height of the enclosing container. This ...

Make a div with absolute positioning overflow outside of a div with relative positioning that is scrollable

I am facing an issue with two columns positioned side by side. The right column contains a tooltip that overflows to the left on hover. Both columns are scrollable and relatively positioned to allow the tooltip to follow the scroll. However, the tooltip is ...

Using assets in data property or methods in Vue 3 with Vite - how to efficiently manage and access resources

Recently delving into Vue 3 and vite, I've encountered a peculiar issue during production build. In development, everything runs smoothly but when I switch to production, the assets defined in the data property are inexplicably ignored, leading to a 4 ...

Attempting to grasp the concept of memory leakage in a more thorough manner

As I dive into the world of frontend development and start learning Vue.js, I came across a paragraph in the tutorial that caught my attention: Vue.js makes rendering a template seem simple, but under the hood it does a lot of work. The data and DOM are ...

jquery is in motion while svg paths are at a standstill, waiting to

i have been attempting to incorporate a css-animated svg into my project. initially, the animation would start automatically, which was undesirable. after some research, i discovered that by declaring it as paused and then triggering it using jQuery with $ ...

Switch between GeoJSON layers by using an HTML button within Mapbox GL JS, instead of relying on traditional links

I am currently developing a web map that requires toggling two GeoJSON layers on and off. In the past, I used Mapbox JS to accomplish this task by adding and removing layers with a custom HTML button click. However, I am facing some challenges in achieving ...

Shift the Search bar to the last position on the navigation bar

I'm looking to relocate the search icon and input field to the end of the navbar. I'm currently using Bootstrap 5.0.2, but I am still new to Bootstrap, HTML, and CSS, so I'm not sure how to accomplish this. I want the width of the search box ...

CSS error with contrasting colors, the reason behind it is unknown

Here is the code snippet I am working on: I have set the background color to #f1f5ff and the font color to #181818. Despite thinking that the contrast is good, I am still encountering an error where the text is not visible. I have tried changing 'c ...

Failure to display masonry arrangement

I am working on creating a stunning masonry layout for my webpage using some beautiful images. Take a look at the code snippet below: CSS <style> .masonryImage{float:left;} </style> JavaScript <script src="ht ...