Giter VIP home page Giter VIP logo

xchart's People

Contributors

akofke avatar cardillo avatar chiamh avatar colmtelus avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar ekleinod avatar emillynge avatar flole998 avatar hakantkn avatar heavysea avatar hwaipy avatar kmels avatar mccartney avatar mr14huashao avatar mrcjkb avatar mvmn avatar nathanklick avatar nordskog avatar nroduit avatar rebaomi avatar ruxlab avatar sjaenick avatar sylvainfurt avatar tdiesler avatar tim-eucalyptus avatar timmolter avatar tomassvensson avatar zhzzang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xchart's Issues

website not working anymore

did you change something?
Hopefully this will be fixed, was my first target to download the latest release

Allow X and Y-Axis sizes to be not the same size

e.g. sometimes i need such chart:

    Collection<Number> xData = new ArrayList<Number>();
    Collection<Number> yData = new ArrayList<Number>();
    for ( int i = 0; i < 10; i++ ){
        xData.add(i);
        yData.add(i*i);
    }
    xData.add(10);
    yData.add(null);

Possible infinite loop in AxisTickNumericalCalculator when frame size is too small

When the frame to display a chart is too small for the chart to be displayed, the code below will go into an infinite loop (in the while loop):

  private BigDecimal getGridStep(int tickSpace) {

    // the span of the data
    double span = Math.abs(maxValue.subtract(minValue).doubleValue()); // in data space

    int tickMarkSpaceHint = (axisDirection == Direction.X ? DEFAULT_TICK_MARK_STEP_HINT_X : DEFAULT_TICK_MARK_STEP_HINT_Y);

    // for very short plots, squeeze some more ticks in than normal
    if (axisDirection == Direction.Y && tickSpace < 160) {
      tickMarkSpaceHint = 25;
    }

    double gridStepHint = span / tickSpace * tickMarkSpaceHint;

    // gridStepHint --> significand * 10 ** exponent
    // e.g. 724.1 --> 7.241 * 10 ** 2
    double significand = gridStepHint;
    int exponent = 0;
    if (significand == 0) {
      exponent = 1;
    }
    else if (significand < 1) {
      while (significand < 1) {
        significand *= 10.0;
        exponent--;
      }
    }

Access to JFrame with chart

Is it possible to get an access to a JFrame which is created by
new SwingWrapper(chart).displayChart(); ?

Actually displayChart() returns void. I would like to gain access to that JFrame because i'd like to set:
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE).

Currently when I close that frame the whole application exists.

improve charts with date axis

  1. allow passing in of date format string
  2. improve date axis tick calculations
  3. Would be nice to be able to set the font for text
  4. allow setting of locale on chart

SwingWrapper Scaling Handling

When using the SwingWrapper with a Chart (generated by QuickChart, don't think that's relvant), if the window is scaled too small, the window stops updating and the whole frame hangs. The window can't be normally closed either, it has to be force-closed.

Multi-line legend

It would be great if seriesName can recognize new line character '\n' and render it on legend properly

Add customization for size of legend markers

See the attached screenshot, the length of the lines in the legend is quite large for such small charts, and can not yet be customized as it is at fixed length of 8*3=24 pixels atm.

Would be nice if this could be made customizable.

distributions

Setting an series property improvement

It would be nice to have possibility to create a chain of settings for an series.
Currently I can set only one parameter:
chart.addSeries( ... ).setLineColor(Color.red);
And to be honest I don't have idea how to set another one :)

However, if setLineColor() (and other) will returns Series I can write something like:
chart.addSeries( ... ).setLineColor(Color.red).setMarker(...);
and so on.

If there is another way to achieve this let me know.

jar file not running

Hello i havedownload and unzipped the files. but when i try to run the jar by clicking it it doesn't do anything
Can you help me hot to install it and how to start using it?

Add function to set min/max values in axis

Sometimes it's necessary to set the minimum/maximum values on an axis. I propose to add a function that calls the AxisPair addMinMax function so that you can at least increase the range if needed.

I've forked the code and have added this and will send a pull request once it's tested.

Allow tilting of X-Axis labels to maximize granularity while displaying long labels

I'm trying to display date formats such as "yyyy-MM-dd HH:mm:ss" and currently, the fact that the labels are displayed horizontally greatly limits the total number of labels that can be printed along the X Axis.

I would like to be able to provide an angle to which the labels get tilted (between 0 and 360°). To maximize space, a 90° or 180° angle could then be used.

PS: I just noticed I can't seem to find a way to define the number of gradations on the X-Axis either (i.e some sort of granularity that defines the number and length of each interval). That seems like it would be a good combination with the feature I'm asking here, if it doesn't already exist.

Series Drawn Incorrectly

I got this in an email today...

I was playing around with the new setX/YAxisMin/Max, and found some unexpected results, as show in these screenshots:

This shows two sets of data plotted on a log plot, with Xchart choosing the axis ranges:

double[] xData = new double[]{0.0, 1.0, 2.0, 3.0, 4.0 ,5,6};
double[] yData = new double[]{106, 44, 26,10, 7.5, 3.4,.88};
double[] yData2 = new double[]{102,49,23.6,11.3,5.4,2.6,1.25};
mychart.getStyleManager().setYAxisLogarithmic(true);

image002

For the plot below I set Y-axis range to 0.01 - 1000 in the code. The axes draw properly, but the data are misplaced:

mychart.getStyleManager().setYAxisLogarithmic(true);
mychart.getStyleManager().setYAxisMin(0.01);
mychart.getStyleManager().setYAxisMax(1000);

image001

Below are the same data, plotted with the x axis limits set to -5 and 10, again the axes are correct but the data misplaced:

mychart.getStyleManager().setXAxisMin(-5);
mychart.getStyleManager().setXAxisMax(10);

image003

100 mBTC Bounty - Multiple Y-Axes on one chart

Like most charting libraries, multiple x-axes per chart should be possible such as shown here: https://bitcoinium.com/ using the Flot Javascript library. Each series should be assignable to an axis. Each axis should be shown on the chart and it should be possible to define whether the axis goes on the left or right side. The data plot should of course scale to the full extend of each axis.

The original feature request for this can be found here: #31

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.