Giter Club home page Giter Club logo

Comments (5)

winston avatar winston commented on June 9, 2024

Hi,

Are you using the series and vAxes options as mentioned here? http://code.google.com/apis/chart/interactive/docs/gallery/linechart.html See: vAxes.

Personally, I have not tried multiple vertical axes yet, but theoretically, the lib should be able to handle all options.

Then again this could be a bug. Can I see how you are passing the vAxes options to the LineChart?

Thanks.

from google_visualr.

bruparel avatar bruparel commented on June 9, 2024

Hello Winston,
I closed the issue accidentally. I meant to reply to your answer :)
I posted a query on Google visualization API and they gave me the Javascript code for doing this. Please see the following thread:

http://groups.google.com/group/google-visualization-api/browse_thread/thread/7b19dd432d89cef3

Following it, I changed my ruby code using your library as follows:

  • opts = {:width => 600,:height => 500,:title => resource.name,:legend => 'none',:hAxis => {:title =>'Year',:slantedText => true,:slantedTextAngle => 90,:showTextEvery => xx_interval(tws.type_well.case_life.to_i)},:vAxes => {0 => {:title => 'Volume', :logScale => true}, 1 => {:title => 'Wells', :logScale => true}},:series => {0 => {:targetAxisIndex => 0}, 1 => {:targetAxisIndex => 1}}}
  • line_chart = GoogleVisualr::Interactive::LineChart.new(m_array, opts)

And It worked fine! So things seem to be working. My scale for one of the vertical axes (the right scale where I am plotting the number of wells comes out in fractions though, so I went back to the gentlemen answering the question and he gave me the javascript code. I am trying to figure out how to make it work, or translate it to the ruby code to use with your library. Any guidance that you can provide will be most useful.

Once again, thanks for your wonderful library. It is very good work. Let me know how can I contribute.

Bharat

from google_visualr.

winston avatar winston commented on June 9, 2024

Hi,

From the thread it seems like it's more a problem of inserting the correct values into the graph then.

As for getting the correct values, I guess you will have to somehow convert that function into Ruby, and pass the maxvalue into the graph. Not sure if I am of any help here.

Anyway, closing this issue now. Thanks!

from google_visualr.

bruparel avatar bruparel commented on June 9, 2024

Hello Winston,
You are right. I gave a maxValue of 1000 in the ruby code and everything was fine. So somehow I need to figure out how the Google Visualizer API likes to make the axis "Integer". Your gem is excellent. Let me know how can I help.
Regards,
Bharat


From: winston [email protected]
To: [email protected]
Sent: Sunday, August 21, 2011 1:26 AM
Subject: Re: [google_visualr] Multiple Vertical Axes (logarithmic) on a line chart (#14)

Hi,

From the thread it seems like it's more a problem of inserting the correct values into the graph then.

As for getting the correct values, I guess you will have to somehow convert that function into Ruby, and pass the maxvalue into the graph. Not sure if I am of any help here.

Anyway, closing this issue now. Thanks!

Reply to this email directly or view it on GitHub:
#14 (comment)

from google_visualr.

santoshkumar611 avatar santoshkumar611 commented on June 9, 2024

if we need three verticla Axes , what is alignment of vAxes

from google_visualr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.