Jump to content
JChartFX Community

JuanC

Administrators
  • Content count

    412
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JuanC

  1. We are researching this issue, in the meantime, if you know your min and max are fixed you can set the major step as follows scale.getTickmarks().getMajor().setStep(10); Regards, JuanC
  2. NULL data in line chart

    There are 2 things in play in your code 1) There is a bug that will prevent you from using a field whose first value is null, we have fixed it internally so we expect to have a new build soon 2) Even with that bug fixed, our behavior to automatically use fields as values to be plotted or labels is to check the value for all the fields for the first object in the array, because of this the automatic detection will not work in your scenario. and you will have to explicitly tell us the fields you want to use, e.g. add this code before setDataSource var fieldMap; var fields = chart1.getDataSourceSettings().getFields(); fieldMap = new cfx.FieldMap(); fieldMap.setName("john smith"); fieldMap.setUsage(cfx.FieldUsage.Value); fields.add(fieldMap); fieldMap = new cfx.FieldMap(); fieldMap.setName("jane doe"); fieldMap.setUsage(cfx.FieldUsage.Value); fields.add(fieldMap); fieldMap = new cfx.FieldMap(); fieldMap.setName("paulie walnuts"); fieldMap.setUsage(cfx.FieldUsage.Value); fields.add(fieldMap); fieldMap = new cfx.FieldMap(); fieldMap.setName("Date"); fieldMap.setUsage(cfx.FieldUsage.XValue); fields.add(fieldMap); There is a workaround which should work on your bits which is to replace the value for any null field in the first object in your data array with cfx.Chart.Hidden, e.g. if your data was declared like this, you would get the expected result var items = [{ 'john smith' : cfx.Chart.Hidden, 'jane doe' : 30, 'paulie walnuts' : 50, 'Date' : '2018-03-01' }, { 'john smith' : 50, 'jane doe' : 20, 'paulie walnuts' : 10, 'Date' : '2018-03-02' }, { 'john smith' : 20, 'jane doe' : 10, 'paulie walnuts' : 60, 'Date' : '2018-03-03' }]; Regards, JuanC
  3. NULL data in line chart

    Can you post a small client side script with hardcoded data that reproduces your issue, e.g. chart1.setDataSource([{"Value":10, "Label":"January"},{"Value":12, "Label":"February"},{"Value":18, "Label":"March"}, {"Value":6, "Label":"April"}, {"Value":8, "Label":"June"},{"Value":13, "Label":"July"}, {"Value":24, "Label":"August"},{"Value":21, "Label":"September"},{"Value":19, "Label":"October"}]); Regards, JuanC
  4. Clickable Legend

    I would suggest you change your code so that chart.create is the last thing you do. The way you are doing it now, when you call chart.create we "render" the current plot (random data) and then your subsequent api calls will mark the chart as dirty so it will be repainted. This may cause some flickering on slow devices. To capture clicks, you need to use attach to the click event, note that the code is slightly different whether you are using jQuery or not. var divHolder = document.getElementById('ChartDiv');chart1.create(divHolder); if (window["jQuery"]) { $("#ChartDiv").click(doClick); } else { divHolder.onclick = doClick; } function doClick(evt) { console.log("Click on " + evt.series + " , " + evt.point); } Note that attaching to click event is one of the few things that HAS to be done after chart create is called. Also note that a click in the legend marker will generate evt.point="-1" and evt.series will hold the series index where a click on a bar/marker would set evt.point with the point index. I noticed that for now you cannot click on the legend text. We should be fixing this in a future build. Regards, JuanC
  5. Tooltip for Candle Chart

    We consider tooltips a popup window that appears when you hover over a chart point/bar. Can you describe exactly what you mean by "how to configure and display the tooltip on the top"? If possible try to include diagrams or pictures to explain what you are looking for. Regards, JuanC
  6. jChartFX can work with or without jQuery. We only interact with it to send mouse click events the "jQuery" way. We used to offer a jQueryUI plugin (jchartfx.ui.js) but this is not supported anymore. Regards, JuanC
  7. Comination Chart

    No. It is not possible to combine horizontal and vertical plots. JuanC
  8. Comination Chart

    Unfortunately it is not possible to achieve the chart you are trying to create. Regards, JuanC
  9. Comination Chart

    Unfortunately density cannot be combined with Candlestick. When I tried visiting the jsfiddle I see no chart, just some javascript code. I would suggest you try to explain with more detail how do you want to combine candlestick, annotations and density including a drawing if possible. Regards, JuanC
  10. Date(s) are 1 day behind

    Alternatively you could try something like this, I have NOT tested this code in all time zones but it should work var date = new Date(); // Round this to avoid handling fractional time zones var timeZone = Math.floor(date.getTimezoneOffset() / 60); var absTimeZone = Math.abs(timeZone); var strTimeZone = absTimeZone.toString(); if (absTimeZone < 10) strTimeZone = "0" + strTimeZone; if (timeZone > 0) strTimeZone = "-" + strTimeZone; else strTimeZone = "+" + strTimeZone; strTimeZone = "T12:00:00" + strTimeZone + ":00"; var items = [{"Value":10, "Date":"2017-11-29" + strTimeZone}, {"Value":10, "Date":"2017-12-15" + strTimeZone}] Note that the code is getting the "local" time zone offset and making sure it is a valid time zone format including leading zeros and minutes. We will research if we can support a scheme where you don't supply time and let us know through a flag that you do not care about times but the code would essentially do the same as shown here. Regards, JuanC
  11. Date(s) are 1 day behind

    This is not a format we established, it is ISO 8601 which is handled by the browser javascript implementation. For Eastern Standard Time you should use "2017-11-29T00:00:00.000-05:00" Regards, JuanC
  12. Date(s) are 1 day behind

    A date like this "2017-11-29T00:00:00.000Z" means November 29th at 12:00 am UTC (greenwich time), which means that the same date shown in an US east coast timezone will be displayed as November 28th (at 7 or 8 PM depending on daylight savings time or eastern standard time status). You could format your dates using the specific time zone instead of Z, e.g "2017-11-29T00:00:00.000-05", alternatively by supplying a time of 1PM in "2017-11-29T13:00:00.000Z" you will get a display of Nov 29 in any time zone from -13 to +9 which would probably cover most of your target audience. Regards, JuanC
  13. We support zoom in the X axis, in an empty chart try this code chart1.getData().setSeries(1); chart1.getData().setPoints(50); chart1.getAxisX().setAutoScroll(true); chart1.getAxisX().setClientScroll(true); Currently, we do not have built-in support for a feature where the user would select a rectangle to zoom into that area. Regards, JuanC
  14. Shows the Text property of the Point object.

    Normally, the labels are provided along with the data, e.g. chart1.setGallery(cfx.Gallery.Pyramid); chart1.setDataSource([{"Value":10, "Product":"ABC"}, {"Value":18, "Product":"DEF"}, {"Value":6, "Product":"GHI"}]); var pointLabels = chart1.getAllSeries().getPointLabels(); pointLabels.setVisible(true); pointLabels.setFormat("%l"); Note that to show the label you should use lowercase L in the format. Regards, JuanC
  15. Hiding a category on x axis

    We have no API that would allow you to remove a set of points/bars in the chart, you will have to keep the array that you supply the chart in the setDataSource call, and when the user wants to hide one or more points, remove them from the array and call setDataSource again. Regards, JuanC
  16. Are you using CSS to style the gauges, if so, you will need to change the colors through CSS. JuanC
  17. Resize chart using doUpdate()

    >> No, If i commit "chart.doUpdate(true);" then every thing is OK, But chart resize not possible What I meant was, can you try commenting the block of code where you customize the chart (chart gallery, colors, etc) and/or the block of code where you pass the data, WITHOUT commenting the doUpdate call to find out if there is a specific code that triggers the issue. >> When i load dashboard-01 first time then resize of chart is working perfect. When i come from same dashboard after dashboard-02 and try to resize then Are dashboard-01 and dashboard-02 different HTML pages? We need to be able to duplicate the problem in-house in order to find a fix and test it. Can you try using console.log to log the sizes of the chart(s) just before you do the initial render as well as before the doUpdate calls? This could let you and us know which of the charts are failing and the sequence of events that triggers the issue, also knowing if the error happens without any of the chart customizations or data will be critical to try to reproduce and fix the issue. Regards, JuanC
  18. Resize chart using doUpdate()

    We will need more information about this issue, including 1) Are there any chart settings relevant to the occurrence of this problem (i.e. does the problem still happens if you comment them out) 2) Is the data relevant to the issue. 3) Does the error happens on a particular scenario, e.g. the first time a chart is resized, when a chart is too big or too small, etc. Regard, JuanC
  19. Tooltip delay

    We added this functionality somewhat recently as setTimeHover and it was later renamed to setInitialDelay. In order to use setTimeHover you need to use build 6114 or newer. In order to use setInitialDelay you need to use build 6162 or newer. I would recommend downloading our pre-release version which is 7.5.6127 and use setTimeHover. We should be uploading a new build soon. Regards, JuanC
  20. Tooltip delay

    chart1.getToolTips().setInitialDelay(200); The delay is specified in milliseconds. Regards, JuanC
  21. Completion of Plotting chart event

    Have you tried using the render event as I showed on my post? It should give you the feature that you need. I do not understand why you cannot invoke the ApplyRuleBuilderOnBarLineUniversalAreaChart before the chart create call, the way you are doing it now the chart will be painted twice (one without the axis section and one with) and that may be visible to the user. Is there a particular reason why you need to wait for the chart to be rendered to create the axis section? But again, if that is what you need you should be able to use the render event. Regards, JuanC
  22. Completion of Plotting chart event

    I am not entirely sure what you mean "fire shading chart function" but there is an event we fire after we are done generating the chart visuals, chart1.on("render", onRenderEvent); function onRenderEvent() { } Hope this helps. JuanC
  23. Problems setting Min/Max for Y Axis

    I was unable to duplicate the issues you describe (and are visible in the screenshots). Can you please provide the code you use to customize the chart? Regards, JuanC
  24. Unable to set line chart series colors

    I am guessing you are talking about the user interface when you select the Series menu. This is created dynamically, we do not use classes in this code but we try to get the color for AttributeX. I noticed we do not try to use the series tag so that could explain a discrepancy between the color in the menu and the series. This has been fixed and the fix will be included in our next drop. Regards, JuanC
  25. Unable to set line chart series colors

    You are doing nothing wrong, this is by design, when you use our CSS it means colors (and fonts, and line widths) are controlled through CSS instead of API, you have 3 options 1) Do not include our palette and attributes CSS, this is recommended if you will need to control several colors "dynamically" 2) Make a copy of the used CSS and change it as needed, e.g. .jchartfx .Attribute0 { fill: #D0C5E3; stroke: #D0C5E3; } Note that sometimes we generate several classes for an object (you can view this using Inspect in your browser), for example, axis sections generate a class such as "AxisSection AxisY_Section AxisY0_Section0" to give you a chance to change all axis sections, all Y axis sections or a particular section by index. 3) Most objects expose a setTag method that allows you to customize the generated class Regards, JuanC
×