Jump to content
JChartFX Community

ramirop

Administrators
  • Posts

    7
  • Joined

  • Last visited

Posts posted by ramirop

  1. Hello,

    Yes. There is full support for JSON when it comes to initializing the chart. You can simply use the setOptions method of the chart and pass the JSON as the parameter:

     chart1.setOptions({
    gallery: cfx.Gallery.Bar,
                           axesStyle: cfx.AxesStyle.Math,
                           allSeries: {
                               pointLabels: {
                                  visible: true
                               }
                           },
                           axisY : {
                               grids: {
                                   major: {
                                       visible: false,
                                       tickMark: cfx.TickMark.None
                                   },
                                   minor: {
                                       visible: false,
                                       tickMark: cfx.TickMark.None
                                   }
                               },
                               customGridLines: [{value:20, text:"Avg"}],
                               sections: [{from:0, to:15}]
                          },
                          titles : [{text: "My Chart"}],
                          dataSource: items
    });

    In regards to the scrolling issue, we are still working on optimizing this functionality and the final API may change . Temporarily, please use clientScroll method in addition to AutoScroll:

                chart1.getData().setPoints(100);
                chart1.getAxisX().setAutoScroll(true);
                chart1.getAxisX().setClientScroll(true);


    Thanks for using jChartFX!

    TT

×
×
  • Create New...