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 8640679

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:20:19+00:00 2026-06-12T11:20:19+00:00

Possible Duplicate: Multiple OHLC datasets in one image Hi So I have plotted a

  • 0

Possible Duplicate:
Multiple OHLC datasets in one image

Hi So I have plotted a candleStick graph using a OHLCDataItem array, and I am also plotting a line graph over the top using the same array, however at the moment the line graph plots the “open” variable of the OHLCDataItem. How do I get it to plot a different variable.
i.e. the constructor is:

OHLCDataItem(java.util.Date date, double open, double high, double low, double close, double volume)

So currently this is my code setting up the graph:

List<OHLCDataItem> data = getData(stockSymbol);
OHLCDataItem[] dataItems = data.toArray(new OHLCDataItem[data.size()]);
XYDataset generalDataSet = new DefaultOHLCDataset(stockSymbol, dataItems);
XYPlot mainPlot = new XYPlot(generalDataSet, domainAxis, rangeAxis, candleStickRenderer);

mainPlot.setDataset(1,  generalDataSet);
mainPlot.setRenderer(1, LineRenderer);

This line: mainPlot.setDataset(1, generalDataSet);
is setting up the plot for the line graph, but I cant figure out how to graph a different variable than “open”. I think it must be straight forward, but I cant grasp it.

  • 0 0 Answers
  • 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-12T11:20:20+00:00Added an answer on June 12, 2026 at 11:20 am

    you probably want OHLCSeries and OHLCSeriesCollection (which implements XYDataset), instead of an OHLCDataItem array and DefaultOHLCDataset.

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

Sidebar

Related Questions

Possible Duplicate: Combine Multiple child rows into one row MYSQL I have following table,
Possible Duplicate: Can I have multiple background images using CSS? Is it possible to
Possible Duplicate: Multiple select options in one row I have the following code but
Possible Duplicate: Multiple Inheritance in C# I have two classes Class A and Class
Possible Duplicate: Bind multiple events to jQuery 'live' method I have the following function:
Possible Duplicate: SQL Server: Can I Comma Delimit Multiple Rows Into One Column? I
Possible Duplicate: Multiple forms on ASP.NET page i have a doubt. can we place
Possible Duplicate: insert multiple rows via a php array into mysql I know about
Possible Duplicate: Uses for multiple levels of pointer dereferences? I have used functions with
Possible Duplicate: Removing multiple classes (jQuery) how can we remove multiple classes from one

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.