最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Highcharts customization PHPMySQL - Stack Overflow

programmeradmin2浏览0评论

I am trying to customize the charts and give a demo to our clients for their approval.

Some final issues we are facing now are,

  1. Issue: Is pagination possible in highcharts for column charts. Suppose if we have 50 or 100 columns.

    How can we avoid our charts being crowded .

    For example take a look at this js fiddle

    /

  2. Issue: If we embed an image or logo in to a chart and try to export it using either either jpg/jpeg we get an error.

    on jsfidlle it works,

    but on our localhost it gives the following error message .

    About to transcode 1 SVG file(s) Converting 551bc090a93c120f987375135e7744db.svg to temp/551bc090a93c120f987375135e7744db.jpg ... ... error ( SVGConverter.error.while.rasterizing.file)
    Error while converting SVG. SVG code for debugging:

I am trying to customize the charts and give a demo to our clients for their approval.

Some final issues we are facing now are,

  1. Issue: Is pagination possible in highcharts for column charts. Suppose if we have 50 or 100 columns.

    How can we avoid our charts being crowded .

    For example take a look at this js fiddle

    http://jsfiddle/justin69/4xSNU/1/

  2. Issue: If we embed an image or logo in to a chart and try to export it using either either jpg/jpeg we get an error.

    on jsfidlle it works,

    but on our localhost it gives the following error message .

    About to transcode 1 SVG file(s) Converting 551bc090a93c120f987375135e7744db.svg to temp/551bc090a93c120f987375135e7744db.jpg ... ... error ( SVGConverter.error.while.rasterizing.file)
    Error while converting SVG. SVG code for debugging:

Share edited Aug 22, 2012 at 9:30 Mihai Iorga 39.7k17 gold badges108 silver badges109 bronze badges asked Apr 10, 2012 at 6:55 RinzlerRinzler 2,1161 gold badge27 silver badges44 bronze badges 3
  • actaully i want to disable legend click on column drilldown but the legend disapper after i drill down and the legend click is enabled again :( – Rinzler Commented Apr 10, 2012 at 6:57
  • 1 Can you edit your question please and remove those code blocks? it's difficult to read! – Flukey Commented Apr 10, 2012 at 6:58
  • @Flukey yeah improved formatting now :) – Rinzler Commented Apr 10, 2012 at 7:13
Add a ment  | 

2 Answers 2

Reset to default 8

Let's see if I can help you...

"Chart Crowded"

I can imagine three ways to avoid your charts to be "crowded":

Method 1: Let the user choose what to see.

Either hide adding visible: false to some or all your series, using this will allow the user to choose what data he wants to see. For example:

series: [
            {
                name: ...,
                data: ...,
                visible: false
            },
            ...
        ]

If you choose this example you could could also think about adding a button to show/hide all, that you can achieve by using:

Hide everything:

for(i=0; i < chart.series.length-1; i++)
    chart.series[i].hide();

Show everything:

for(i=0; i < chart.series.length-1; i++)
    chart.series[i].show();

Method 2: Zoomming your way out of the problem

In alternative you can use zoomType: 'x' in your chart allowing the user to zoom and see the data in detail, the user can then scroll with the zoom to the left and right of the chart or reset the zoom and choose another point to see.


Method 3: overflow

In alternative you can create a giant chart and use overflow to allow the chart div to be scrollable, or hide the overflow and manage the scrollX & scrollY trough jQuery.


Can you provide the code or link to fiddle of the svg example so I can check your code and see if I can help you with that?

Thank you.

1. Crowded Charts

a. Have you tried rotating the labels? This would significantly reduce the overcrowding on the labels that you earlier had.

Here's your Fiddle with the label mod: http://jsfiddle/kayen/YSwk4/

b. If you have a lot of values and are restricted by space on the x-axis, you can convert your column-type chart to a bar-type chart.

Here's your Fiddle with the bar-chart mod: http://jsfiddle/kayen/QqPha/

I would suggest using the first option as you can fit much more values in the same space and have a much cleaner chart.

发布评论

评论列表(0)

  1. 暂无评论