Jump to content
JChartFX Community

David.Harris

Members
  • Content Count

    3
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by David.Harris

  1. I have a system that generates a chart on a page. The user can then update the chart settings using the new menu that is supplied in the latest release. Is there a way to retrieve the settings that have been set by the user so I can persist them somewhere and restore the page as the user configured next time the user returns to the page? TL;DR - Can I save menu changes?
  2. Did you ever get a response to this because I am facing the same issue with some charts I am creating and I am not even sure where to begin resolving this.
  3. I am trying to create a chart with time displayed on the XAxis. I have set the format to HH:mm:ss on the axis and I have data from the last 2 minutes to display in the chart but when the chart renders the tooltips have the properly formatted time value in but the xaxis is blank. Am I missing something? GenerateChartData(); chart1 = new cfx.Chart(); chart1.setGallery(cfx.Gallery.Bar); chart1.getView3D().setEnabled(true); var fields = chart1.getDataSourceSettings().getFields(); //Create and add the temperature field var temperatureField = new cfx.FieldMap(); temperatureField.setName('temperature'); temperatureField.setUsage(cfx.FieldUsage.Value); fields.add(temperatureField); //Create and add the pressure field var pressureField = new cfx.FieldMap(); pressureField.setName('pressure'); pressureField.setUsage(cfx.FieldUsage.Value); fields.add(pressureField); //Create and add the recordTimeField (for the x axis) var recordTimeField = new cfx.FieldMap(); recordTimeField.setName('recordTime'); recordTimeField.setUsage(cfx.FieldUsage.XValue); fields.add(recordTimeField); chart1.getAxisX().getLabelsFormat().setFormat(cfx.AxisFormat.Date); chart1.getAxisX().getLabelsFormat().setCustomFormat("HH:mm:ss"); chart1.getAxisX().getTitle().setText("Log Time"); chart1.getAxisX().setStep(1); //chart1.getAxisX().setStaggered(true); chart1.setDataSource(data); var titles = chart1.getTitles(); var title = new cfx.TitleDockable(); title.setText("Pressure and Temperature over Time"); titles.add(title); chart1.getAllSeries().getPointLabels().setVisible(false); var divHolder = document.getElementById('ChartDiv'); chart1.create(divHolder); The data generated for the chart looks like this [{"recordTime":"2014-07-03T11:02:29.031Z","temperature":159.79,"pressure":78},{"recordTime":"2014-07-03T11:02:30.033Z","temperature":116.2,"pressure":34},{"recordTime":"2014-07-03T11:02:31.034Z","temperature":123.73,"pressure":34},{"recordTime":"2014-07-03T11:02:32.034Z","temperature":132.29,"pressure":90},{"recordTime":"2014-07-03T11:02:33.035Z","temperature":134.95,"pressure":88},...] Even when I reduce the number of points down I still cannot get any values to appear on the xAxis, has anyone come across this or tried to do this before?
×
×
  • Create New...