Jump to content
JChartFX Community

cmb99

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by cmb99

  1. Ok. I see now you have to add multiple titles to get line breaks. Next item. multiple series with setColor for each one. I thought that this example would create two series, but apparently not ? var chart1; chart1 = new cfx.Chart(); chart1.setGallery(cfx.Gallery.Bar); chart1.getView3D().setEnabled(true); var items = [ {"Group" : "Candidate Score", "Value": 0.49}, {"Group" : "Other Candidates Score", "Value" : 0.85} ]; chart1.getAxisY().getLabelsFormat().setFormat(cfx.AxisFormat.Percentage); chart1.setDataSource(items); chart1.getGalleryAttributes().setIntraSeriesGap(0); chart1.getAxisY().setMax(1); var allSeries = chart1.getAllSeries(); allSeries.setVolume(100); var divHolder = document.getElementById(divId); chart1.create(divHolder);
  2. ok. little-by-little, I seem to be marching forward. the command is chart1.getToolTips().setEnabled(false) now I am trying to introduce a line break into the chart title. this does not seem to work: var title = new cfx.TitleDockable(); title.setText("First line \n Second line"); chart1.getTitles().add(title);
  3. Ok, I only had one series. It works with more than one, however, only when Volume = 100. Now, I am trying to chart1.setToolTips(false), and I get "Object doesn't support property or method 'setToolTips'.
  4. Hi the code is posted above. should be a complete example . . setVolume(100) makes the bars fuller but not adjacent. setIntraSeriesGap has no effect. There are two series I believe
  5. also trying to set distance between bars: chart1.getGalleryAttributes().setIntraSeriesGap(0);
  6. Hello, trying to set width on legend docked near bottom. setHeight working fine. thx function loadChart(titleStr) { chart1 = new cfx.Chart(); chart1.setGallery(cfx.Gallery.Bar); chart1.getView3D().setEnabled(true); var title; title = new cfx.TitleDockable(); title.setText(titleStr); chart1.getTitles().add(title); title.setPlotAreaOnly(true); var data = chart1.getData(); data.setSeries(2); data.setPoints(2); var items = [{ "Candidate": 0.49, "Competing Employees": 0.85 }]; chart1.getAxisY().getLabelsFormat().setFormat(cfx.AxisFormat.Percentage); chart1.setDataSource(items); chart1.getAxisY().setMax(1); chart1.getAxisX().setVisible(false); var allSeries = chart1.getAllSeries(); var pointLabels = allSeries.getPointLabels(); pointLabels.setVisible(true); pointLabels.setOffset("16,16"); var legend = chart1.getLegendBox() legend.setDock(cfx.DockArea.Bottom); legend.setWidth(100); }
×
×
  • Create New...