A Pen by Hatem Alimam on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createTransform } from 'redux-persist'; | |
const blacklistTransform = createTransform((inboundState, key) => { | |
if (key === 'Auth') { | |
return inboundState.delete('refreshTokenPromise'); | |
} | |
return inboundState; | |
}); | |
const persistOptions = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = require("lodash"); | |
const aws = require("aws-sdk"); | |
const config = require("./config"); | |
aws.config.update({ | |
accessKeyId: config.awsAccesskeyID, | |
secretAccessKey: config.awsSecretAccessKey, | |
region: config.awsRegion | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ManagedBean | |
@ViewScoped | |
public class ChartDataBean implements Serializable { | |
private LineChartModel pluginsModel; | |
public ChartDataBean() { | |
createCharts(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.example-plugin-threshold .ct-line { | |
stroke-dasharray: 5px; | |
animation: dashoffset 1s linear infinite; | |
} | |
.example-plugin-threshold.ct-chart .ct-series .ct-bar.ct-threshold-above,.example-plugin-threshold.ct-chart .ct-series .ct-line.ct-threshold-above,.example-plugin-threshold.ct-chart .ct-series .ct-point.ct-threshold-above { | |
stroke: #f05b4f; | |
} | |
.example-plugin-threshold.ct-chart .ct-series .ct-bar.ct-threshold-below,.example-plugin-threshold.ct-chart .ct-series .ct-line.ct-threshold-below,.example-plugin-threshold.ct-chart .ct-series .ct-point.ct-threshold-below { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ct:chart id="lineChart" type="line" model="#{chartDataBean.pluginsModel}" plugins="myPlugins" | |
styleClass="example-plugin-threshold"> | |
</ct:chart> | |
<script> | |
//plugins array | |
var myPlugins = | |
[ | |
Chartist.plugins.ctThreshold({ | |
threshold: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p:selectBooleanCheckbox itemLabel="Check All" | |
widgetVar="checkAllWV" | |
onchange="selectAllCheckBoxes(PF('checkAllWV'),PF('manyCheckWV'))"> | |
</p:selectBooleanCheckbox> | |
<p:selectManyCheckbox widgetVar="manyCheckWV"> | |
<f:selectItems value="#{mainBean.list}"/> | |
</p:selectManyCheckbox> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p:diagram id="diagram" value="#{mainBean.diagramModel}" style="height:400px" styleClass="ui-widget-content" widgetVar="diagramWV" /> | |
<p:growl widgetVar="growlWV" /> | |
<script> | |
//<![CDATA[ | |
$(document).ready(function () { | |
setTimeout(function () { | |
for (var key in PF('diagramWV').canvas.getAllConnections()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.chartistjsf.model.chart.AspectRatio; | |
import org.chartistjsf.model.chart.ChartSeries; | |
import org.chartistjsf.model.chart.PieChartModel; | |
import org.primefaces.event.ItemSelectEvent; | |
@ManagedBean | |
public class ChartDataBean { | |
private PieChartModel pieChartModel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ct:chart id="pieChart" type="pie" model="#{chartDataBean.pieChartModel}" > | |
<p:ajax event="itemSelect" listener="#{chartDataBean.pieItemSelect}" update="pieChartMessage" /> | |
</ct:chart> | |
<p:message id="pieChartMessage" for="pieChart" showDetail="true" /> |
NewerOlder