Welcome Guest Search | Active Topics |

Welcome to jqChart Plugin for jQuery Forum
Dragan
#1 Posted : Sunday, March 13, 2011 11:25:16 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hello,

Welcome to jqChart forum on anything related to jqChart Plugin for jQuery. Feel free to discuss/ask anything related to the product here. We respect community forums a lot and try to answer/address anything discussed here to the best of our abilities.

You may also browse the demos here:
jqChart Plugin for jQuery Samples
Best Regards,
Dragan Matek
jqChart Inc.
MagnaQuest
#2 Posted : Monday, February 01, 2016 8:15:01 AM(UTC)
Rank: Newbie

Groups: jQueryChart, Registered
Joined: 1/28/2016(UTC)
Posts: 7

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
Hi,

i am using jqchart for jquery plugin, i want to fix max width of bar or column shown in chart. for some of data showing bar as huge. can you please advice any property for fix max width for bar or columns showing in chart image.
Dragan
#3 Posted : Tuesday, February 02, 2016 8:16:06 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

please, try the following code:

Code:
$(document).ready(function () {

            $('#jqChart').bind('shapeRendering', function (e, shape) {

                var maxWidth = 10;

                if (shape.width > maxWidth) {

                    var dx = (shape.width - maxWidth) / 2;

                    shape.x += dx;
                    shape.width = maxWidth;
                }
            });

            $('#jqChart').jqChart({
                title: 'shapeRendering Event',
                series: [
                    {
                        type: 'column',
                        title: 'Column',
                        data: [['A', 46], ['B', 35], ['C', 68],
                            ['D', 30], ['E', 27], ['F', 85], ['G', 43], ['H', 29]]
                    }
                ]
            });
        });
Best Regards,
Dragan Matek
jqChart Inc.
MagnaQuest
#4 Posted : Thursday, February 04, 2016 4:25:20 AM(UTC)
Rank: Newbie

Groups: jQueryChart, Registered
Joined: 1/28/2016(UTC)
Posts: 7

Thanks: 3 times
Was thanked: 0 time(s) in 0 post(s)
Hi,
I have used the above code and it work fine for a column chart, I can able to control the fill style width, But if I apply the same to Bar Chart, it is displayed in bits, not the total bar is shown in the chart. Please, provide a solution for the bar chart.

Thank you.
Dragan
#5 Posted : Monday, February 08, 2016 4:12:36 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Here is:
Code:
$(document).ready(function () {

            $('#jqChart').bind('shapeRendering', function (e, shape) {

                var maxHeight = 10;

                if (shape.width > maxHeight) {

                    var dy = (shape.height - maxHeight) / 2;

                    shape.y += dy;
                    shape.height = maxHeight;
                }
            });

            $('#jqChart').jqChart({
                title: 'shapeRendering Event',
                series: [
                    {
                        type: 'bar',
                        title: 'Bar',
                        data: [['A', 46], ['B', 35], ['C', 68],
                            ['D', 30], ['E', 27], ['F', 85], ['G', 43], ['H', 29]]
                    }
                ]
            });
        });
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.171 seconds.