Jump to content
JChartFX Community

JuanC

Administrators
  • Posts

    421
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by JuanC

  1. It sounds like something that can be acomplished with jChartFX but we do not provide a filtering method (or UI) so once the user selects the 2 characters you would have to repopulate the chart with data for those 2 characters only.

    The other parts you described, 200+ individual horizontal bars representing characters, vertical lines (we call them custom gridlines) representing special events should be supported.

    One thing to notice is that we support scrolling in the X axis, in your case the characters axis, but not the Y axis.

    JuanC 

  2. jChartFX does not have toolbar support.

    We share some code and documentation between our different charting products (.NET, Java, HTML5, iOS) so that particular part of the documentation will be updated soon in our site. Sorry for the inconvenience.

    Regards,

    JuanC 

  3. If you are plotting currency, you probably want to change the axis so that not only the tooltips but the axis itself will show the currency symbol.

         chart1.getAxisY().getLabelsFormat().setFormat(cfx.AxisFormat.Currency);

    In 7.1 we allow users to completely customize the tooltips, unfortunately some of the docs are out of date, also we are currently not honoring the format property as we should so you will need the following.

        chart1.getToolTips().setContentTemplate('<DataTemplate><TextBlock Text="{Binding Path=MacroValue is %v}"/></DataTemplate>');

        chart1.getToolTips().setAllSeries(false); 

    The string that follows Macro will be parsed in the same way as we used to support the ToolTipFormat, note that with the new approach you can place multiple texts with different font attributes if needed. We will simplify this in future builds if you want to use a single string by supporting the format property on this object.

    Regards,

    JuanC 

  4. Unfortunate when replacing a culture you have to provide all the values we need, e.g.

        chart1.setCulture({ "shortDate": "M/dd/yyyy",

                     "days": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],

                     "abbDays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],

                     "months": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],

                     "abbMonths": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],

                     "am": "AM",

                     "pm": "PM",

                     "dateSepa": "/",

                     "timeSepa": ":",

                     

                     // Numeric

                     "decSymb": ".",

                     "groupNumb": 3,

                     "groupCurr": 3,

                     "groupSymb": ",",

                     "currSymb": "\u00A3",

                     "currPos": 0,

                     "currNeg": 0,

                     "percSymb": "%",

                     "percPos": 1,

                     "percNeg": 1

                   });

      

    We will consider supporting just adding the new values in a future build.

    JuanC 

  5. Note that the fact that we generate elements that are in the plotarea as C0s and elements in the legend as C1s is entirely an implementation detail.

    If you are using jChartFX.coreVector.js and can live with 2D rendering you can take advantage of our "stylable" templates by using one of the following prebuilt templates for doughnut (to use one of these you have to include jChartFX.vectorTemplates.js as well)

        chart1.getGalleryAttributes().setTemplate("DoughnutMetal");

        chart1.getGalleryAttributes().setTemplate("DoughnutSpotlight");

        chart1.getGalleryAttributes().setTemplate("DoughnutBasic");

    Additionally we can help you creating new templates, this would be a template similar to the default 2D doughnut look but adding a background shadow, the background shadow can be moved by changing the values of C.left and C.top and the blurriness can be changed by changing the number in BBE R="2"
     
        chart1.getGalleryAttributes().setTemplate('<T><T.R><T K="cfxBackgroundFull"><C><P D="{B G}" F="#808080" C.Left="4" C.Top="4"><P.BE><BBE R="2"/></P.BE></P></C></T><T K="cfxForegroundFull"><C c="{B CE}"><E A="0.75" ST="1"><E.F><R><G C="#00000000" O="0.8"/><G C="#67000000" O="1"/></R></E.F><E.S><L E="0.829,0.87" S="0.203,0.082"><G C="#4CFFFFFF" O="0"/><G C="#00FFFFFF" O="1"/></L></E.S></E></C></T></T.R><C><P D="{B G}" F="{B F}" S="{B S}"/><P D="{B G}" F="{N}" A="0.2"><P.S><L E="1,1" S="0,0"><G C="#FFFFFFFF" O="0"/><G C="#FF000000" O="1"/></L></P.S></P></C></T>');
      
    Regards,
     
    JuanC 
  6. It is kind of strange, initially we only had the API and the chart had its "default" colors built-in but we thought for many web developers changing colors through the API would feel strange as they are accustomed to handle this through CSS.

    Bottom line is, if you want to change attrbutes globally you can do so through the CSS, if you have to change attributes programatically you might be better off not including the CSS and handling it through the API.

    JuanC 

  7. If you want to know the data associated with a specific point you can do something like this

    var value = chart1.getData().getItem(args.getSeries(), args.getPoint());

    Note that value will contain the value plotted for the specific bar/point you are highlighting, this is not the pixel position of the cursor. About the release date for the fix, we recently released build 4982 which should fix the tooltip issue where point and series was always returned as 0.

    Regards,

    JuanC 

  8. If you know the index of the slice you want to configure, i.e. in your case if the slice is always the first slice (or you can loop through the data and recognize the slices you need to configure) you could do something like this

    chart1.getPoints().getItem(-1,0).setColor("#A0A0A0");

    The first parameter of -1 means for all series (you could also use 0 as your chart only has 1 series) and the second parameter of 0 is the index of the point (first point in your data set).

    Regards,

    JuanC 

     

  9. 1) 

    chart.off is used to detach your function from the event, i.e. you do not want to be called anymore when the tooltip is about to appear. Unfortunately we currently do NOT have an event that is fired when the tooltip is being hidden. You could try checking when the mouse is no longer over the chart but note that the tooltip dissappears even if the mouse is over the chart but is not over any of the bars/points.

    2)

    To remove the fade in/out, modify the jchartfx.css file, and in the jchartfxToolTip2Visible and jchartfxToolTip2Hidden classes remove all the transition properties. Please note that in 7.0 we had ToolTipVisible and ToolTipHidden classes, in 7.1 we added the ToolTIp2* classes used for the new stylable tooltips

    3)

    Not sure what you mean about the background shadow of the pie chart, are you looking for a background shadow for all the slices or the rectangle that contains the chart? Can you post a simulated screeenshot of what you are looking for?

    Regards,

    JuanC 

    post-2107-13939743384758_thumb.jpg

  10. jChartFX supports multiple Y axes, but you can only assign specific series to an axis (not points). To workaround this, you could change your data so that it has 2 series (I am calling them here Pollution and Pollution2) and make sure you use hidden so that you only have 1 value for each point.

        var data = [

                      { "Flow": "NOX", "Pollution": 1.124026397, "Pollution2": cfx.Chart.Hidden },

                      { "Flow": "PM10 total", "Pollution": 1.157768278, "Pollution2": cfx.Chart.Hidden },

                      { "Flow": "PM10 nonex", "Pollution": 1.140897337, "Pollution2": cfx.Chart.Hidden },

                      { "Flow": "PM2.5 total", "Pollution": 1.157768278, "Pollution2": cfx.Chart.Hidden },

                      { "Flow": "PM2.5 nonex", "Pollution": 1.140897337, "Pollution2": cfx.Chart.Hidden },

                      { "Flow": "HC", "Pollution": 1.161986013, "Pollution2": cfx.Chart.Hidden },

                      { "Flow": "CO2", "Pollution": cfx.Chart.Hidden, "Pollution2": 154.161986013 },

                    ];    

        chart1.setGallery(cfx.Gallery.Bar);    

        // Show Secondary Axis

        chart1.getAxisY2().setVisible(true);

        // Setup second series (Pollution2) to use secondary axis

        chart1.getData().setSeries(2);

        chart1.getSeries().getItem(1).setAxisY(chart1.getAxisY2());    

        // Make sure bars are not half width to leave room for second series

        chart1.getGalleryAttributes().setOverlap(true);    

        // Configure visual settings

        chart1.getAllSeries().setMultipleColors(true);

        chart1.getAxisY().getLabelsFormat().setDecimals(2);

        

        chart1.setDataSource(data);

     

    Hope this helps

    JuanC 

  11. This code will push the labels 6 pixels away from the bars in a gantt chart, please note that in vertical galleries, the offset is used as X,Y but in Gantt is reversed to Y,X.

        chart1.setGallery(cfx.Gallery.Gantt);

        var pointLabels = chart1.getAllSeries().getPointLabels();

        pointLabels.setVisible(true);

        pointLabels.setOffset("0,6");

    Note that the depth of a 3D bar depends on the number of bars in your chart so the offset might have to be changed depending on the total number of points*series in the chart , we will research if we can change our behavior so that the labels do not get painted over the face of the lateral side in a gantt chart.  

    Regards,

    JuanC 

  12. Try using the developer tools in your browser(s) to display the console and check for any error messages.

    In Firefox: Tools - Web Developer - Web Console

    In Chrome: View - Developer - JavaScript Console

    In IE: F12

    Also let us know the browser(s) you are testing. In all browsers you can also check if there was a problem downloading one of he JS files.

    Regards,

    JuanC 

×
×
  • Create New...