Jump to content
JChartFX Community


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by JuanC

  1. From google's web site long: JavaScript has no 64-bit integral type, so long needs special consideration. Prior to GWT 1.5, the long type was was simply mapped to the integral range of a 64-bit JavaScript floating-point value, giving long variables an actual range less than the full 64 bits. As of GWT 1.5, long primitives are emulated as a pair of 32-bit integers, and work reliably over the entire 64-bit range. Overflow is emulated to match the expected behavior. There are a couple of caveats. Heavy use of long operations will have a performance impact due to the underlying emulation. Additionally, long primitives cannot be used in JSNI code because they are not a native JavaScript numeric type. I will check if we can support gwt long values, in the meantime you will have to use either parseInt or parseFloat depending on the type of your data values. JuanC
  2. If you want a simpler looking chart you should use jchartfx.coreBasic instead of jchartfx.coreVector, this will give you simpler bars (no gradients or round bars) and a solid background. Please note that removing or modifying the watermark is not supported under the license for our free component. JuanC
  3. I tested your original code "as is" and it worked fine, when you say decimal value do you mean hardcoded values such as 10.5? There should be no need to parse numbers as integers. JuanC
  4. I apologize, the version we are currently shipping has this function obfuscated. I will make sure our next build (probably available in a couple of days or so) has a public doUpdate method you can call. If you want to try it now, the obfuscated method name is _ud so your code would be chart._ud(true) JuanC
  5. In jChartFX all series have the same number of points, visually you can achieve series that look shorter than others by using Hidden values but internally we keep track of the number of points globally (and not per-series) getData().getPoints returns the number of points on each of the series, i.e. in a chart with 2 series (PreviousYear vs LastYear) and 12 points (monthly), getData().getPoints() will return 12 (not 24) JuanC
  6. chart1.getData().getSeries() returns the number of series chart1.getData().getPoints() returns the number of points chart1.getData().getItem(series,point) returns the value for the specified series/point combination chart1.getData().setItem(series, point, value) sets the value for the specified series/point combination. You would only use getData().getX() if you were interested in getting/setting the X axis values in an XY chart. Note that alternatively you could create a new jscript array with the accumulated values and invoke setDataSource again. JuanC
  7. You do not want to call again chart1.create as this will create another SVG. There is an undocumented method in the chart class that will update the chart after the div size has been changed. chart1.doUpdate(true) JuanC
  8. I apologize for the lack of docs related to "enumerations". Here is a list of the gallery types supported by the gallery property, please note that we also support "extension" galleries but they require you to create a new object and use setGalleryAttributes (we ship extension galleries to support HighLow, Equalizer, Density, HeatMap and TreeMap) cfx.Gallery.Lines cfx.Gallery.Bar cfx.Gallery.Area cfx.Gallery.Scatter cfx.Gallery.Pie cfx.Gallery.Step cfx.Gallery.HighLowClose cfx.Gallery.Radar cfx.Gallery.Cube cfx.Gallery.Bubble cfx.Gallery.OpenHighLowClose cfx.Gallery.Candlestick cfx.Gallery.Gantt cfx.Gallery.Curve cfx.Gallery.Pareto cfx.Gallery.Surface cfx.Gallery.Doughnut cfx.Gallery.Pyramid cfx.Gallery.Contour cfx.Gallery.CurveArea Also note that to use Pyramid, Surface, Contour, Radar, Pareto or the financial galleries you need to include additional scripts in your page. Most of these galleries also need specialized data so you probably don't want to mix them with "general" charts. JuanC
  9. No. We do not support this option at this time. Copying the data to the clipboard might not be that hard, copying the image is another matter. ChartFX currently uses SVG which AFAIK does not provide a programmatic way to render an SVG element to a bitmap. Canvas does provide an option to generate images but early in the development cycle we decided SVG was a better fit because it allows to integrate with CSS and makes code that detect events/scrolling/etc. much easier. We left the door open so that in the future we could plug a Canvas renderer but this is not fully implemented at the time. JuanC Attachments.zip
  10. I am not sure what you mean "by changing the chart to be cumulative", can you explain this in detail? If you want to stack bars on top of each other, you might want to try using the getAllSeries().setStackedStyle(cfx.Stacked.Normal) If you actually want to loop through the data, you can use Chart.getData(), this will return a data object that exposes a getItem(series,point) method where you can retrieve the values being plotted by the chart. Regards, JuanC
  11. We do not provide a UI but it would be a matter of tracking the current gallery and changing it as appropriate. To change the gallery you would invoke the setGallery method with the desired value in cfx.Gallery (e.g. Area, Bar, Lines, etc.) Please note that certain galleries expect a specific number of series, e.g. a bubble chart needs 2 (o more exactly a multiple of 2) series. JuanC
  12. Any of our collections (for example Chart.getTitles) returns a collection class, this class contains a getItem(index) method that returns a specific item in the collection. It also contains a clear() method to clean up the collection if needed. JuanC
  13. To use the pyramid gallery you also need to include jchartfx.pyramid.js, also all of our classes and enumerations are declared inside the cfx object so you have to use cfx.Gallery.GalleryGoesHere. Try replacing Gallery.Pyramid with cfx.Gallery.Bar, if that works, make sure you include jchartfx.pyramid.js JuanC
  14. ChartFX 7 and jChartFX shared the same object model so code should be easy to translate between them. As of today jChartFX does not support XML or binary serialization, the main reason for this is to keep the javascript files as small as possible, I am not sure if when you say chart templates you mean WinForms code that customizes the chart or if you have specific scenarios where you need to reuse ChartFX templates (those handled in WinForms using the Chart.Import and Chart.Export calls) Please provide more specific information if possible, you can also contact our support team to discuss the functionality you need. Regards, JuanC
  15. chart.getPoints() will only give you access to per-point attributes. To retrieve the value you would use chart.getData().getItem(seriesIndex, pointIndex) To retrieve the X axis label you would use chart.getAxisX().getLabels(pointIndex) JuanC
  16. JuanC

    Zoom ScrollBar

    Even though it is not strictly related to having a zoom scrollbar, this sample uses X data, there are some galleries that do not support X data such as Bar. The sample should work fine as a line chart. Regards, JuanC
  17. Currently we do not provide an API where you assign a URL to a series. Instead you should just handle the click event in the div where the chart is created, we add fields to the evt argument so that you know the series and point the user clicked. This way you can jump to a different page, update the current page, etc. There is a sample that shows this (Drill Down Chart), this sample is a little more complex as it shows how to replace the chart with a new details chart but you should be able to use the same principle to jump to another page. Regards, JuanC Attachments.zip
  18. Although generating a PNG would be possible it would also require for us to implement a drawing API (e.g. drawing polygons, circles, paths, colors, gradients, etc.) which would be prohibitive expensive in terms of development time and script size. Another alternative would be to try to support VML, this is something we are considering but have not made a decision yet. It will depend on customer feedback. Regards, JuanC Attachments.zip
  • Create New...