Giter Site home page Giter Site logo

hatemalimam / chartistjsf Goto Github PK

View Code? Open in Web Editor NEW
39.0 8.0 12.0 170 KB

Highly Customizable Responsive Charts for JavaServer Faces.

Home Page: https://chartistjsf-showcase.herokuapp.com

License: Apache License 2.0

Java 82.52% JavaScript 17.48%
jsf primefaces chart java svg chartistjs

chartistjsf's People

Contributors

hatemalimam 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chartistjsf's Issues

FileNotFoundException

Im using primefaces 6
Springboot
Spring webflow** i think this is the problem

This ocourr when i put the library in the pom

Allow for specification of x and y values

Hi,

thank you very much for your awesome library. Is it possible to allow the specification of x and y variables in line charts (similar to primefaces)?

Thank you very much

Uncaught ReferenceError: ChartistJSF is not defined

Hello,

I'm using the last version of the build but I keep on getting the following error:
Uncaught ReferenceError: ChartistJSF is not defined

For some reason, the chartisjsf.js file is not added automatically. Any idea what could be causing this?

Thanks,
Bram

Possibility to use Dates in X-Axis

Hey, I just found this library yesterday and I am trying to determine if it will meet my needs. I need to be able to specify date values for my x-axis. So far, I am seeing that the x-axis is just hard set labels. Since my dates will vary wildly, and points won't always line up directly with the label, that won't work well. Is it hard to get dates or at least some sort of value instead of just a string value for the x-axis?

Bugfix: Support thresholds for bar charts

Like mentioned in the documentation, threshold plugin should also work for bar charts. But currently plugins are only usable for line charts because of missing support for plugins in bar chart.

LineRenderer.java:

if (chart.getPlugins() != null) {
	writer.write(",plugins:" + chart.getPlugins());
}

BarRenderer.java:

No part for handling plugins.

Fix should be easy, just add the lines from LineRenderer.java to BarRenderer.java.

add onlyInteger to axisY

example:

  axisY: {
     // Use only integer values (whole numbers) for the scale steps
     onlyInteger: false
  }

add className on series

add className to ChartSeries, an example:

series: [ { name: 'Series Name', data: [ .... ], className: 'my-css-class' } ]

ChartRenderer.startScript does not work with PF 8.0 due to Primefaces CoreRenderer API change

Relevent error:

java.lang.NoSuchMethodError: org.chartistjsf.component.chart.ChartRenderer.startScript(Ljavax/faces/context/ResponseWriter;Ljava/lang/String;)V at org.chartistjsf.component.chart.ChartRenderer.encodeScript(ChartRenderer.java:98) at org.chartistjsf.component.chart.ChartRenderer.encodeEnd(ChartRenderer.java:66) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920) at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:88) at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:70) Truncated. see log file for complete stacktrace

Reason: Chart Renderer extends Core Renderer and it used inherited method startScript which does not exist any longer on Core Renderer version 8.0

Missing artifact org.chartistjsf:ChartistJSF:jar:3.0

Using:

<!-- https://mvnrepository.com/artifact/org.chartistjsf/ChartistJSF -->
<dependency>
    <groupId>org.chartistjsf</groupId>
    <artifactId>ChartistJSF</artifactId>
    <version>3.0</version>
</dependency>

In maven gives me a:

Description	Resource	Path	Location	Type
Missing artifact org.chartistjsf:ChartistJSF:jar:3.0	pom.xml	/ChartistJSF-Showcase-master	line 81	Maven Dependency Problem

(the version 2.1 is working fine on the same project)

For now I had to manually install with:

mvn install:install-file -Dfile=/Users/madx/Desktop/ChartistJSF-3.0.jar -DgroupId=org.chartistjsf -DartifactId=ChartistJSF -Dversion=3.0 -Dpackaging=jar

Incorrect artifactId in Maven dependency

Minor issue with Maven dependency mentioned at https://github.com/hatemalimam/ChartistJSF

<dependency>
    <groupId>org.chartistjsf</groupId>
    <artifactId>chartistjsf</artifactId>
    <version>0.9</version>      
</dependency>

The dependency above does not work, it should be:

<dependency>
    <groupId>org.chartistjsf</groupId>
    <artifactId>ChartistJSF</artifactId>
    <version>0.9</version>
</dependency>

lower boundary ignored

Hi everyone,
It seems like the lower boundary is ignored - it should be reproducible using the following code.
The upper boundary works fine.

Backing Bean

lineChartModel = new LineChartModel();
lineChartModel.setAspectRatio(AspectRatio.DOUBLE_OCTAVE);
lineChartModel.setShowArea(true);
lineChartModel.setFullWidth(true);
lineChartModel.setLow(0);
lineChartModel.setHigh(100);
lineChartModel.setShowPoint(false);
        
Axis xAxis = lineChartModel.getAxis(AxisType.X);
xAxis.setShowLabel(false);

LineChartSeries cpuUsage = new LineChartSeries();
        
for (int i = 0; i < 21; i++) {
    lineChartModel.addLabel(i);
    cpuUsage.set(ThreadLocalRandom.current().nextInt(30, 50 + 1));
}

lineChartModel.addSeries(cpuUsage);

Screenshot
image

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.