Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8562395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:43:16+00:00 2026-06-11T16:43:16+00:00

I want to create a jqPlot line chart which has the ability to change

  • 0

I want to create a jqPlot line chart which has the ability to change orientation between vertical and horizontal orientation. I was able to achieve this using CSS rules, by rotating the div element containing the chart.

My work up to now: http://jsfiddle.net/GayashanNA/A4V4y/14/

But the problem is I also want to track the mouse-pointer and mouse clicks on points on chart after the orientation is flipped because i want to annotate those points. I am unable to do this when the chart is in vertical orientation. Can anyone suggest a method to do this? Or am i approaching the problem in a wrong way?

(Note: I am able to do this in horizontal orientation, you can observe it if you try to click on a point on the above chart.)

Thanks and help is much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:43:17+00:00Added an answer on June 11, 2026 at 4:43 pm

    I finally found a solution for the problem. But i had to change jqPlot library to achieve this. To help anyone else who run in to the same problem, i’ll put my solution here.

    First i had to insert the following code in to the jqPlot class of the jquery.jqplot.js file, which is the core library.

    function jqPlot() {
        //add the following code segment
        var verticallyOriented = false;
        this.setVertical = function(state){
            verticallyOriented = state;
        }
        //don't change other code that isn't mentioned here
    
        //now you have to change the logic in the getEventPosition function
        //to make sure the new orientation is detected
        function getEventPosition(ev) {
            //change the line starting with var gridPos = ...
            //to the following code segment
            //depending on the orientation the event position calculating algorithm is changed
            if(verticallyOriented){
                var gridPos = {x:ev.pageY - go.top , y:plot.eventCanvas._elem.height() - ev.pageX + go.left};
            } else {
                var gridPos = {x:ev.pageX - go.left, y:ev.pageY - go.top};
            }
            //no change to other code is needed
        }
    }
    

    You can view a working example here: http://jsfiddle.net/GayashanNA/yZwxu/

    Gist for the changed library file: https://gist.github.com/3755694

    Please correct me if i have done something wrong.

    Thanks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want create wordpress website into which I want create user management... That means
I want create module which update list of usb devices automatically (not only mass
I want create a pdf using iText. The method which does this is a
I want create a generic (general) method which accepts the return types of LINQ
I'm trying to learn JPA and I want create a simple Java command line
I want create a DataSet class which is basically a list of samples. But
I want create a ruby script that I can run on the command line
I want create a site by command line using appcmd. How can I associate
I want create a query that creates a calculated field ANSWER_SCORE which it then
I want create a command that has the following structure command path/to/some/file How do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.