Jump to content
JChartFX Community

cmb99

Members
  • Posts

    6
  • Joined

  • Last visited

Posts 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. 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...