Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1407056

    The aspect ratio of the chart is fixed so on a mobile device like Galaxy S20, the canvas has a fixed height of only 153px. With a larger number of datasets on a bar chart, or if those dataset titles need to be longer, on mobile they wrap to a second line. Between the chart title, dataset titles and X-axis titles, they take up almost all of the space.Then the part that ends up being variable is the height of the Y-axis in the chart itself. So on mobile you can end up with a chart with a Y-axis labeled as 0, with lines or bars that are only a few pixels tall.

    Removing the chart headline helps. Shortening the dataset titles when possible will also help, but it’s still really short on mobile so it is harder to understand the data because there’s so little variation in the height of bars.

    #1407157

    Line chart on mobile

    #1407182

    Hi,

    Thank you for the inquiry.

    We would need to inspect the chart element to provide the necessary modifications. Please provide us with the site details in the private field. Have you considered using a different chart for mobile view? You can utilize the builder element’s Advanced > Responsive > Element Visibility settings to toggle the display of the element on different screen sizes and maybe display a different type of chart for smaller screens.

    Best regards,
    Ismael

    #1407262
    This reply has been marked as private.
    #1407403

    Hi,

    Thank you for the info.

    You can try this css code to adjust the height of the chart but it might distort the element a bit.

    .avia-chart-container.av-2vujhrt-0855884933b1b8267e5416ea7624b97a canvas.avia-chart {
        min-height: 500px;
    }

    Please make sure toggle or temporarily disable the Enfold > Performance > File Compression settings after adding the css modification.

    Best regards,
    Ismael

    #1410376

    > it might distort the element a bit.

    Yeah, I had already tried to adjust the height. It distorts it a lot.

    I also have a pie chart issue. With 12 labels, the whole pie disappears because of the fixed height of the element.

    #1410414

    Hi,

    Thank you for the update.

    Have you tried adjusting the value of the min-height property? On screens smaller than 767px, the height of the line graph hovers around 200px. Adjusting the min-height value closer to the default height should help.

    @media only screen and (max-width: 767px) {
    
      /* Add your Mobile Styles here */
      .avia-chart-container.av-2vujhrt-0855884933b1b8267e5416ea7624b97a canvas.avia-chart {
        height: 250px !important;
      }
    }
    

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.