Jump to content
JChartFX Community

Janusz

Members
  • Posts

    6
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Janusz

  1. Hi, i completely rebuild my code, started with the simply coed from you and add step for step my staff. it works, i can't understand what was wrong in my first version, but it's ok for me now thank you for support
  2. Hi, i attach the click event as last action. chart1.create("myjChartFX"); $(""myjChartFX").click(function (evt) { alert(evt.series); if (evt.hitType == cfx.HitType.Point) alert("Series " + evt.series + " Point " + evt.point); }); as you suggest. The click event will be fired, but as i described. The event will not get any info about series. evt.series and evt.point are not defined.
  3. Hi, i tried to add "onClick" on a pie chart, like you described: $("#myjChartFX").click(function (evt) { if (evt.hitType == cfx.HitType.Point) alert("Series " + evt.series + " Point " + evt.point); }); i'm using: <script type="text/javascript" src="../js/jquery-1.11.3.min.js"></script> <script type="text/javascript" src="../js/jquery-ui.min.js"></script> <script type="text/javascript" src="./Resources/jchartfx.system.js"></script> <script type="text/javascript" src="./Resources/jchartfx.coreVector.js"></script> <script type="text/javascript" src="./Resources/jchartfx.advanced.js"></script> <script type="text/javascript" src="./Resources/jchartfx.animation.js"></script> <script type="text/javascript" src="./Resources/jchartfx.userInterface.js"></script> unfortunately the evt.hitType is 0 and cfx.HitType.Point is 4. And also the evt.series and evt.point are undefined. I'm using your sample from the dowload zip with pie samples. i also tried to use the <script type="text/javascript" src="./resources/jquery-1.7.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <script type="text/javascript" src="http://www.jchartfx.com/libs/v7/current/js/jchartfx.full.js"></script> same result. my js: var chart1 = new cfx.Chart(); var strTitle = "my sample" chart1.setGallery(cfx.Gallery.Pie); chart1.getAllSeries().getPointLabels().setVisible(true); var pie = chart1.getGalleryAttributes(); pie.setExplodingMode(cfx.ExplodingMode.All); PopulateData(chart1); var fields = chart1.getDataSourceSettings().getFields(); var field1 = new cfx.FieldMap(); field1.setName("Region"); field1.setUsage(cfx.FieldUsage.RowHeading); fields.add(field1); var field2 = new cfx.FieldMap(); field2.setName("keyFigure"); field2.setUsage(cfx.FieldUsage.ColumnHeading); fields.add(field2); var fieldVal = new cfx.FieldMap(); fieldVal.setName("Usage"); fieldVal.setUsage(cfx.FieldUsage.Value); fields.add(fieldVal); var crosstab = new cfx.data.CrosstabDataProvider(); crosstab.setDataSource(chart1.getDataSource()); chart1.setDataSource(crosstab); var data = chart1.getData(); data.setSeries(1); var titles = chart1.getTitles(); var title = new cfx.TitleDockable(); title.setText(strTitle); titles.add(title); chart1.getAllSeries().getPointLabels().setVisible(true); chart1.getAllSeries().getPointLabels().setAlignment(cfx.StringAlignment.NEAR); chart1.getAnimations().getLoad().setEnabled(true); chart1.create("myjChartFX"); i'll be grateful for any help :-)
  4. Hi, I'm absolutly new in jCharFX. Your Answert confused me. As far i can see it; >>> event hasn't a property evt.hitType nor evt.series nor evt.point do i have to add any cfx specyfic event?
  5. Hi, 1) do i have a possibility to show the absolute values (not the percantage) in the legend, near to the text? 2) do i have a possibility to show the absolute values, not the percantage in the pie? thanks for any help
  6. Hi, how can i catch the click event on a partof a pie chart, and how to get the info whitch part was clicked? thanks for your help
×
×
  • Create New...