Jump to content
JChartFX Community

timp

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

1 Neutral

About timp

  • Rank
    Newbie
  1. Hi, I have the following dataset var pItems = [{"Xdata":305, "Ydata":6},{"Xdata":1196, "Ydata":40}, {"Xdata":1889, "Ydata":2}, {"Xdata":1995, "Ydata":16}, {"Xdata":2006, "Ydata":113}, {"Xdata":2071, "Ydata":1}, {"Xdata":3343, "Ydata":11}, {"Xdata":3631, "Ydata":69}, {"Xdata":3697, "Ydata":913}, {"Xdata":5555, "Ydata":1}]; which I use to create a bar chart with, ChartDetail = new cfx.Chart(); ChartDetail.getData().setSeries(1); ChartDetail.getDataSourceSettings().getFields().clear(); ChartDetail.setDataSource(pItems); xAxis.setStep(1); xAxis.setLabelValue(1); ChartDetail.setGallery(cfx.Gallery.Bar); var sb = new cfx.SimpleBorder(); ChartDetail.setBorder(sb); ChartDetail.getAllSeries().setMarkerShape(cfx.MarkerShape.None); ChartDetail.getLegendBox().setVisible(false); ChartDetail.getAxisY().setAutoScale(true); ChartDetail.getAxisY().getGrids().getMajor().setVisible(true); ChartDetail.getAxisX().getGrids().getMajor().setVisible(true); ChartDetail.getAxisX().setStyle(ChartDetail.getAxisX().getStyle() | cfx.AxisStyles.ShowEnds); var divHolder = document.getElementById(pDivDetail); ChartDetail.create(divHolder); However, the labels on the xaxis are somehow rounded such that 305 becomes 400, 1196 becomes 1200 etc. Additionally, some labels are not displayed, i.e. 1889, 2006 and 3631. Any ideas how to fix this? Any help much appreciated.
×
×
  • Create New...